Fix specs for TemplatePicker
This commit is contained in:
parent
ec9c8d7dae
commit
e9977af7b1
1 changed files with 6 additions and 5 deletions
|
|
@ -24,9 +24,9 @@ describe TemplatePicker do
|
|||
end
|
||||
|
||||
describe '#status_with_photo_backdrop?' do
|
||||
it 'is true if the post contains a single photo and text' do
|
||||
it 'is false even if the post contains a single photo and text' do
|
||||
@post_stubs.merge!(:photos => stub(:size => 1))
|
||||
TemplatePicker.new(post).should be_status_with_photo_backdrop
|
||||
TemplatePicker.new(post).should_not be_status_with_photo_backdrop
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -37,9 +37,9 @@ describe TemplatePicker do
|
|||
end
|
||||
|
||||
describe '#photo_backdrop?' do
|
||||
it 'is true if the post contains only one photo' do
|
||||
it 'is false even if the post contains only one photo' do
|
||||
@post_stubs.merge!(:photos => stub(:size => 1))
|
||||
TemplatePicker.new(post).should be_photo_backdrop
|
||||
TemplatePicker.new(post).should_not be_photo_backdrop
|
||||
end
|
||||
|
||||
end
|
||||
|
|
@ -51,7 +51,8 @@ describe TemplatePicker do
|
|||
end
|
||||
|
||||
describe 'factories' do
|
||||
TemplatePicker::TEMPLATES.each do |template|
|
||||
# No photo_backdrop for now.
|
||||
(TemplatePicker::TEMPLATES - ['status_with_photo_backdrop', 'photo_backdrop']).each do |template|
|
||||
describe "#{template} factory" do
|
||||
it 'works' do
|
||||
post = FactoryGirl.build(template.to_sym, :author => alice.person)
|
||||
|
|
|
|||
Loading…
Reference in a new issue