OSDN Git Service

Merge branch 'v04' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v04license
[pettanr/pettanr.git] / spec / models / artist_spec.rb
index 4a4b83c..4993cbb 100644 (file)
@@ -96,16 +96,16 @@ describe Artist do
       c.should eq [@artist]
     end
     it '時系列で並んでいる' do
-      n = Factory :artist, :author_id => @author.id, :name => 'artist'
+      n = Factory :artist, :author_id => @author.id, :name => 'artist', :updated_at => Time.now + 100
       l = Artist.list
       l.should eq [n, @artist]
     end
     context 'DBに5件あって1ページの件数を2件に変えたとして' do
       before do
-        @artist2 = Factory :artist, :author_id => @author.id, :name => 'artist2'
-        @artist3 = Factory :artist, :author_id => @author.id, :name => 'artist3'
-        @artist4 = Factory :artist, :author_id => @author.id, :name => 'artist4'
-        @artist5 = Factory :artist, :author_id => @author.id, :name => 'artist5'
+        @artist2 = Factory :artist, :author_id => @author.id, :name => 'artist2', :updated_at => Time.now + 100
+        @artist3 = Factory :artist, :author_id => @author.id, :name => 'artist3', :updated_at => Time.now + 200
+        @artist4 = Factory :artist, :author_id => @author.id, :name => 'artist4', :updated_at => Time.now + 300
+        @artist5 = Factory :artist, :author_id => @author.id, :name => 'artist5', :updated_at => Time.now + 400
         Artist.stub(:default_page_size).and_return(2)
       end
       it '通常は2件を返す' do