end
context 'DBに5件あって1ページの件数を2件に変えたとして' do
before do
- @sb2 = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :t => 1, :speech_balloon_template_id => @speech_balloon_template.id
+ @sb2 = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :t => 1, :speech_balloon_template_id => @speech_balloon_template.id, :updated_at => Time.now + 100
@speech2 = @sb2.build_speech(
FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id)
)
)
@sb2.boost
@sb2.save!
- @sb3 = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :t => 2, :speech_balloon_template_id => @speech_balloon_template.id
+ @sb3 = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :t => 2, :speech_balloon_template_id => @speech_balloon_template.id, :updated_at => Time.now + 200
@speech3 = @sb3.build_speech(
FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id)
)
)
@sb3.boost
@sb3.save!
- @sb4 = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :t => 3, :speech_balloon_template_id => @speech_balloon_template.id
+ @sb4 = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :t => 3, :speech_balloon_template_id => @speech_balloon_template.id, :updated_at => Time.now + 300
@speech4 = @sb4.build_speech(
FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id)
)
)
@sb4.boost
@sb4.save!
- @sb5 = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :t => 4, :speech_balloon_template_id => @speech_balloon_template.id
+ @sb5 = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :t => 4, :speech_balloon_template_id => @speech_balloon_template.id, :updated_at => Time.now + 400
@speech5 = @sb5.build_speech(
FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id)
)
end
context 'DBに5件あって1ページの件数を2件に変えたとして' do
before do
- @sb2 = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :t => 1, :speech_balloon_template_id => @speech_balloon_template.id
+ @sb2 = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :t => 1, :speech_balloon_template_id => @speech_balloon_template.id, :updated_at => Time.now + 100
@speech2 = @sb2.build_speech(
FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id)
)
)
@sb2.boost
@sb2.save!
- @sb3 = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :t => 2, :speech_balloon_template_id => @speech_balloon_template.id
+ @sb3 = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :t => 2, :speech_balloon_template_id => @speech_balloon_template.id, :updated_at => Time.now + 200
@speech3 = @sb3.build_speech(
FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id)
)
)
@sb3.boost
@sb3.save!
- @sb4 = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :t => 3, :speech_balloon_template_id => @speech_balloon_template.id
+ @sb4 = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :t => 3, :speech_balloon_template_id => @speech_balloon_template.id, :updated_at => Time.now + 300
@speech4 = @sb4.build_speech(
FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id)
)
)
@sb4.boost
@sb4.save!
- @sb5 = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :t => 4, :speech_balloon_template_id => @speech_balloon_template.id
+ @sb5 = FactoryGirl.build :speech_balloon, :panel_id => @panel.id, :t => 4, :speech_balloon_template_id => @speech_balloon_template.id, :updated_at => Time.now + 400
@speech5 = @sb5.build_speech(
FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id)
)