From c50223b76fdb843dc7e4d4522627a5b20f955a03 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sat, 30 Aug 2008 22:47:28 -0700 Subject: Fix tests that assumed implicit order by id --- .../test/cases/associations/has_many_through_associations_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord') diff --git a/activerecord/test/cases/associations/has_many_through_associations_test.rb b/activerecord/test/cases/associations/has_many_through_associations_test.rb index 3e3c7a95b7..0be050ec81 100644 --- a/activerecord/test/cases/associations/has_many_through_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_through_associations_test.rb @@ -202,7 +202,7 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase end def test_get_ids - assert_equal [posts(:welcome).id, posts(:authorless).id], people(:michael).post_ids + assert_equal [posts(:welcome).id, posts(:authorless).id].sort, people(:michael).post_ids.sort end def test_get_ids_for_loaded_associations @@ -217,7 +217,7 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase def test_get_ids_for_unloaded_associations_does_not_load_them person = people(:michael) assert !person.posts.loaded? - assert_equal [posts(:welcome).id, posts(:authorless).id], person.post_ids + assert_equal [posts(:welcome).id, posts(:authorless).id].sort, person.post_ids.sort assert !person.posts.loaded? end end -- cgit v1.2.3