aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/cascaded_eager_loading_test.rb
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2017-07-15 21:17:27 +0200
committerKasper Timm Hansen <kaspth@gmail.com>2017-07-15 21:17:27 +0200
commitaad42dce10a9cc110d67fa03a72ce5b41cbb394a (patch)
tree7c22623e9f34f2ff7bfa142385010b6a4e5aea85 /activerecord/test/cases/associations/cascaded_eager_loading_test.rb
parent92fb8621a623afb33a145b1f3736010a3c870086 (diff)
parentb6300f3ecc79bff29cf9bb804a30fd92403feac1 (diff)
downloadrails-aad42dce10a9cc110d67fa03a72ce5b41cbb394a.tar.gz
rails-aad42dce10a9cc110d67fa03a72ce5b41cbb394a.tar.bz2
rails-aad42dce10a9cc110d67fa03a72ce5b41cbb394a.zip
Merge branch 'master' into unlock-minitest
Diffstat (limited to 'activerecord/test/cases/associations/cascaded_eager_loading_test.rb')
-rw-r--r--activerecord/test/cases/associations/cascaded_eager_loading_test.rb6
1 files changed, 0 insertions, 6 deletions
diff --git a/activerecord/test/cases/associations/cascaded_eager_loading_test.rb b/activerecord/test/cases/associations/cascaded_eager_loading_test.rb
index 3638c87968..7b0445025c 100644
--- a/activerecord/test/cases/associations/cascaded_eager_loading_test.rb
+++ b/activerecord/test/cases/associations/cascaded_eager_loading_test.rb
@@ -34,18 +34,12 @@ class CascadedEagerLoadingTest < ActiveRecord::TestCase
end
def test_eager_association_loading_with_hmt_does_not_table_name_collide_when_joining_associations
- assert_nothing_raised do
- Author.joins(:posts).eager_load(:comments).where(posts: { tags_count: 1 }).to_a
- end
authors = Author.joins(:posts).eager_load(:comments).where(posts: { tags_count: 1 }).to_a
assert_equal 1, assert_no_queries { authors.size }
assert_equal 10, assert_no_queries { authors[0].comments.size }
end
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("people.id").to_a
- end
assert_equal people(:michael), Person.eager_load(primary_contact: :primary_contact).where("primary_contacts_people_2.first_name = ?", "Susan").order("people.id").first
end