aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/eager_test.rb
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2017-05-29 20:37:35 +0200
committerKasper Timm Hansen <kaspth@gmail.com>2017-05-29 20:37:35 +0200
commite1758b5e8c8d49fdf931b0b3f8009810880113a6 (patch)
tree97181998af56fff415827af679253b1472aa0006 /activerecord/test/cases/associations/eager_test.rb
parent61413b592dbbd6d7adbcb16fb95f760b0656cd9b (diff)
parente7a33a5ed74cc0987544396f0742110fa5a5e228 (diff)
downloadrails-e1758b5e8c8d49fdf931b0b3f8009810880113a6.tar.gz
rails-e1758b5e8c8d49fdf931b0b3f8009810880113a6.tar.bz2
rails-e1758b5e8c8d49fdf931b0b3f8009810880113a6.zip
Merge branch 'master' into unlock-minitest
Diffstat (limited to 'activerecord/test/cases/associations/eager_test.rb')
-rw-r--r--activerecord/test/cases/associations/eager_test.rb7
1 files changed, 1 insertions, 6 deletions
diff --git a/activerecord/test/cases/associations/eager_test.rb b/activerecord/test/cases/associations/eager_test.rb
index 11f4aae5b3..4271a09c9b 100644
--- a/activerecord/test/cases/associations/eager_test.rb
+++ b/activerecord/test/cases/associations/eager_test.rb
@@ -1094,12 +1094,6 @@ class EagerAssociationTest < ActiveRecord::TestCase
assert_equal authors(:david), assert_no_queries { posts[0].author }
posts = assert_queries(2) do
- Post.all.merge!(select: "distinct posts.*", includes: :author, joins: [:comments], where: "comments.body like 'Thank you%'", order: "posts.id").to_a
- end
- assert_equal [posts(:welcome)], posts
- assert_equal authors(:david), assert_no_queries { posts[0].author }
-
- posts = assert_queries(2) do
Post.all.merge!(includes: :author, joins: { taggings: :tag }, where: "tags.name = 'General'", order: "posts.id").to_a
end
assert_equal posts(:welcome, :thinking), posts
@@ -1363,6 +1357,7 @@ class EagerAssociationTest < ActiveRecord::TestCase
assert_nothing_raised do
authors(:david).essays.includes(:writer).any?
authors(:david).essays.includes(:writer).exists?
+ authors(:david).essays.includes(:owner).where("name IS NOT NULL").exists?
end
end