mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix tests that assumed implicit order by id
This commit is contained in:
parent
a59a3db1f3
commit
c50223b76f
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue