diff options
Diffstat (limited to 'activerecord/test/associations_test.rb')
-rwxr-xr-x | activerecord/test/associations_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/associations_test.rb b/activerecord/test/associations_test.rb index c7092bb1f9..4c8d169566 100755 --- a/activerecord/test/associations_test.rb +++ b/activerecord/test/associations_test.rb @@ -1354,7 +1354,7 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase devel.save assert !proj.new_record? assert_equal devel.projects.last, proj - assert_equal Developer.find(1).projects.last, proj # prove join table is updated + assert_equal Developer.find(1).projects.sort_by(&:id).last, proj # prove join table is updated end def test_build_by_new_record @@ -1375,7 +1375,7 @@ class HasAndBelongsToManyAssociationsTest < Test::Unit::TestCase proj = devel.projects.create("name" => "Projekt") assert_equal devel.projects.last, proj assert !proj.new_record? - assert_equal Developer.find(1).projects.last, proj # prove join table is updated + assert_equal Developer.find(1).projects.sort_by(&:id).last, proj # prove join table is updated end def test_create_by_new_record |