OSDN Git Service

Merge branch 'v04' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v04license
[pettanr/pettanr.git] / spec / models / panel_spec.rb
index 09d08b0..4e54620 100644 (file)
@@ -519,16 +519,16 @@ describe Panel do
       pl.should eq [@panel]\r
     end\r
     it '時系列で並んでいる' do\r
-      npl = Factory :panel, :comic_id => @comic.id, :author_id => @author.id, :t => 1\r
+      npl = Factory :panel, :comic_id => @comic.id, :author_id => @author.id, :t => 1, :updated_at => Time.now + 100\r
       pl = Panel.list\r
       pl.should eq [npl, @panel]\r
     end\r
     context 'DBに5件あって1ページの件数を2件に変えたとして' do\r
       before do\r
-        @npl2 = Factory :panel, :comic_id => @comic.id, :author_id => @author.id, :t => 1\r
-        @npl3 = Factory :panel, :comic_id => @comic.id, :author_id => @author.id, :t => 2\r
-        @npl4 = Factory :panel, :comic_id => @comic.id, :author_id => @author.id, :t => 3\r
-        @npl5 = Factory :panel, :comic_id => @comic.id, :author_id => @author.id, :t => 4\r
+        @npl2 = Factory :panel, :comic_id => @comic.id, :author_id => @author.id, :t => 1, :updated_at => Time.now + 100\r
+        @npl3 = Factory :panel, :comic_id => @comic.id, :author_id => @author.id, :t => 2, :updated_at => Time.now + 200\r
+        @npl4 = Factory :panel, :comic_id => @comic.id, :author_id => @author.id, :t => 3, :updated_at => Time.now + 300\r
+        @npl5 = Factory :panel, :comic_id => @comic.id, :author_id => @author.id, :t => 4, :updated_at => Time.now + 400\r
         Panel.stub(:default_page_size).and_return(2)\r
       end\r
       it '通常は2件を返す' do\r