diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-09-23 18:15:38 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-09-23 18:15:38 -0700 |
commit | bb9554ad62a3f37738ee7ad99dbbb9a37784c343 (patch) | |
tree | da8cb33aec4a67c5e3ab459c421b21a83b44a90f /activerecord/test | |
parent | 9b47142ce120d0a7d715648259ffa238526d1f82 (diff) | |
download | rails-bb9554ad62a3f37738ee7ad99dbbb9a37784c343.tar.gz rails-bb9554ad62a3f37738ee7ad99dbbb9a37784c343.tar.bz2 rails-bb9554ad62a3f37738ee7ad99dbbb9a37784c343.zip |
we can't sort by lhs since the middle records have difference classes
and possibly different rules for finding those objects
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/associations/has_many_through_associations_test.rb | 3 |
1 files changed, 2 insertions, 1 deletions
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 149c9576ca..29f6166b00 100644 --- a/activerecord/test/cases/associations/has_many_through_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_through_associations_test.rb @@ -47,7 +47,8 @@ class HasManyThroughAssociationsTest < ActiveRecord::TestCase club1 = Club.includes(:members).find_by_id club.id left, right = club1.members.map(&:id) - assert_operator left, :>, right + assert_equal [member1, member2].sort_by(&:id), + club1.members.sort_by(&:id) end def make_model(name) |