diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-06-25 16:31:42 -0300 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-06-25 12:44:57 -0700 |
commit | efbd0eb9f7508187259208caf6b51eec206cbac9 (patch) | |
tree | 01285294abc19e99922e224c8c45aeb50bea4888 /activerecord/test/cases | |
parent | ccc8eba4dcdee9ae07788574f7cfffe1e15c2d0a (diff) | |
download | rails-efbd0eb9f7508187259208caf6b51eec206cbac9.tar.gz rails-efbd0eb9f7508187259208caf6b51eec206cbac9.tar.bz2 rails-efbd0eb9f7508187259208caf6b51eec206cbac9.zip |
Order is not guaranteed here, ordering by id of people table makes it work
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/associations/cascaded_eager_loading_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/associations/cascaded_eager_loading_test.rb b/activerecord/test/cases/associations/cascaded_eager_loading_test.rb index 050b730dda..9c5dcc2ad9 100644 --- a/activerecord/test/cases/associations/cascaded_eager_loading_test.rb +++ b/activerecord/test/cases/associations/cascaded_eager_loading_test.rb @@ -41,9 +41,9 @@ class CascadedEagerLoadingTest < ActiveRecord::TestCase def test_eager_association_loading_grafts_stashed_associations_to_correct_parent assert_nothing_raised do - Person.eager_load(:primary_contact => :primary_contact).where('primary_contacts_people_2.first_name = ?', 'Susan').order('primary_contacts_people_2.id').all + Person.eager_load(:primary_contact => :primary_contact).where('primary_contacts_people_2.first_name = ?', 'Susan').order('people.id').all end - assert_equal people(:michael), Person.eager_load(:primary_contact => :primary_contact).where('primary_contacts_people_2.first_name = ?', 'Susan').order('primary_contacts_people_2.id').first + assert_equal people(:michael), Person.eager_load(:primary_contact => :primary_contact).where('primary_contacts_people_2.first_name = ?', 'Susan').order('people.id').first end def test_eager_association_loading_with_cascaded_two_levels_with_two_has_many_associations |