OSDN Git Service

t#32025:comic rename
[pettanr/pettanr.git] / spec / models / speech_balloon_spec.rb
index 47e1afb..4d63aca 100644 (file)
@@ -295,7 +295,7 @@ describe SpeechBalloon do
     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)
         )
@@ -304,7 +304,7 @@ describe SpeechBalloon do
         )
         @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)
         )
@@ -313,7 +313,7 @@ describe SpeechBalloon do
         )
         @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)
         )
@@ -322,7 +322,7 @@ describe SpeechBalloon do
         )
         @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)
         )
@@ -419,7 +419,7 @@ describe SpeechBalloon do
     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)
         )
@@ -428,7 +428,7 @@ describe SpeechBalloon do
         )
         @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)
         )
@@ -437,7 +437,7 @@ describe SpeechBalloon do
         )
         @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)
         )
@@ -446,7 +446,7 @@ describe SpeechBalloon do
         )
         @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)
         )
@@ -532,7 +532,7 @@ describe SpeechBalloon do
     end
     context 'DBに5件あって1ページの件数を2件に変えたとして' do
       before do
-        @other_sb2 = FactoryGirl.build :speech_balloon, :panel_id => @other_panel.id, :t => 1, :speech_balloon_template_id => @speech_balloon_template.id
+        @other_sb2 = FactoryGirl.build :speech_balloon, :panel_id => @other_panel.id, :t => 1, :speech_balloon_template_id => @speech_balloon_template.id, :updated_at => Time.now + 100
         @other_sb2.build_speech(
           FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id)
         )
@@ -541,7 +541,7 @@ describe SpeechBalloon do
         )
         @other_sb2.boost
         @other_sb2.save!
-        @other_sb3 = FactoryGirl.build :speech_balloon, :panel_id => @other_panel.id, :t => 2, :speech_balloon_template_id => @speech_balloon_template.id
+        @other_sb3 = FactoryGirl.build :speech_balloon, :panel_id => @other_panel.id, :t => 2, :speech_balloon_template_id => @speech_balloon_template.id, :updated_at => Time.now + 200
         @other_sb3.build_speech(
           FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id)
         )
@@ -550,7 +550,7 @@ describe SpeechBalloon do
         )
         @other_sb3.boost
         @other_sb3.save!
-        @other_sb4 = FactoryGirl.build :speech_balloon, :panel_id => @other_panel.id, :t => 3, :speech_balloon_template_id => @speech_balloon_template.id
+        @other_sb4 = FactoryGirl.build :speech_balloon, :panel_id => @other_panel.id, :t => 3, :speech_balloon_template_id => @speech_balloon_template.id, :updated_at => Time.now + 300
         @other_sb4.build_speech(
           FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id)
         )
@@ -559,7 +559,7 @@ describe SpeechBalloon do
         )
         @other_sb4.boost
         @other_sb4.save!
-        @other_sb5 = FactoryGirl.build :speech_balloon, :panel_id => @other_panel.id, :t => 4, :speech_balloon_template_id => @speech_balloon_template.id
+        @other_sb5 = FactoryGirl.build :speech_balloon, :panel_id => @other_panel.id, :t => 4, :speech_balloon_template_id => @speech_balloon_template.id, :updated_at => Time.now + 400
         @other_sb5.build_speech(
           FactoryGirl.attributes_for(:speech, :writing_format_id => @writing_format.id)
         )