aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/relations_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/relations_test.rb')
-rw-r--r--activerecord/test/cases/relations_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb
index 535bcd4396..eb268017f8 100644
--- a/activerecord/test/cases/relations_test.rb
+++ b/activerecord/test/cases/relations_test.rb
@@ -263,6 +263,7 @@ class RelationTest < ActiveRecord::TestCase
end
def test_find_with_preloaded_associations
+ ActiveRecord::IdentityMap.without do
assert_queries(2) do
posts = Post.preload(:comments)
assert posts.first.comments.first
@@ -288,9 +289,11 @@ class RelationTest < ActiveRecord::TestCase
assert posts.first.author
assert posts.first.comments.first
end
+ end
end
def test_find_with_included_associations
+ ActiveRecord::IdentityMap.without do
assert_queries(2) do
posts = Post.includes(:comments)
assert posts.first.comments.first
@@ -311,6 +314,7 @@ class RelationTest < ActiveRecord::TestCase
assert posts.first.author
assert posts.first.comments.first
end
+ end
end
def test_default_scope_with_conditions_string
@@ -552,9 +556,11 @@ class RelationTest < ActiveRecord::TestCase
end
def test_relation_merging_with_preload
+ ActiveRecord::IdentityMap.without do
[Post.scoped & Post.preload(:author), Post.preload(:author) & Post.scoped].each do |posts|
assert_queries(2) { assert posts.first.author }
end
+ end
end
def test_relation_merging_with_joins