aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2010-06-09 04:25:06 -0300
committerJosé Valim <jose.valim@gmail.com>2010-06-09 10:06:41 +0200
commit6898c167c3906b87dcf52cf6c088ae9f08f3ad22 (patch)
treec416bb8082b9abcaef31aad607d2f45c547ace33 /activerecord/test/cases
parent5b42acdadd0da164ede9e3c5f9afbd9ef18fb8e9 (diff)
downloadrails-6898c167c3906b87dcf52cf6c088ae9f08f3ad22.tar.gz
rails-6898c167c3906b87dcf52cf6c088ae9f08f3ad22.tar.bz2
rails-6898c167c3906b87dcf52cf6c088ae9f08f3ad22.zip
Make sure about which is the first element of the query, fixes a postgresql 8.4 failing test
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/associations/cascaded_eager_loading_test.rb4
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 7a4a33d177..050b730dda 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').all
+ Person.eager_load(:primary_contact => :primary_contact).where('primary_contacts_people_2.first_name = ?', 'Susan').order('primary_contacts_people_2.id').all
end
- assert_equal people(:michael), Person.eager_load(:primary_contact => :primary_contact).where('primary_contacts_people_2.first_name = ?', 'Susan').first
+ 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
end
def test_eager_association_loading_with_cascaded_two_levels_with_two_has_many_associations