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