Commit bed30d5055566e868a416fd4b7fc5f5afd6167cb

Authored by Rafael Martins
1 parent 654ec096

Changed more_recent test to check for updated_at instead of created_at

Showing 1 changed file with 4 additions and 4 deletions   Show diff stats
test/unit/profile_test.rb
@@ -1554,12 +1554,12 @@ class ProfileTest < ActiveSupport::TestCase @@ -1554,12 +1554,12 @@ class ProfileTest < ActiveSupport::TestCase
1554 1554
1555 should 'find more recent profile' do 1555 should 'find more recent profile' do
1556 Profile.delete_all 1556 Profile.delete_all
1557 - p1 = fast_create(Profile, :created_at => 4.days.ago)  
1558 - p2 = fast_create(Profile, :created_at => Time.now)  
1559 - p3 = fast_create(Profile, :created_at => 2.days.ago) 1557 + p1 = fast_create(Profile, :updated_at => 4.days.ago)
  1558 + p2 = fast_create(Profile, :updated_at => Time.now)
  1559 + p3 = fast_create(Profile, :updated_at => 2.days.ago)
1560 assert_equal [p2,p3,p1] , Profile.more_recent 1560 assert_equal [p2,p3,p1] , Profile.more_recent
1561 1561
1562 - p4 = fast_create(Profile, :created_at => 3.days.ago) 1562 + p4 = fast_create(Profile, :updated_at => 3.days.ago)
1563 assert_equal [p2,p3,p4,p1] , Profile.more_recent 1563 assert_equal [p2,p3,p4,p1] , Profile.more_recent
1564 end 1564 end
1565 1565