diff options
Diffstat (limited to 'activerecord/test/cases/relations_test.rb')
-rw-r--r-- | activerecord/test/cases/relations_test.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb index 109cb2c6bc..cb217a65db 100644 --- a/activerecord/test/cases/relations_test.rb +++ b/activerecord/test/cases/relations_test.rb @@ -285,7 +285,7 @@ class RelationTest < ActiveRecord::TestCase assert posts.first.comments.first end - assert_queries(1) do + assert_queries(ActiveRecord::IdentityMap.enabled? ? 1 : 2) do posts = Post.preload(:comments).to_a assert posts.first.comments.first end @@ -295,12 +295,12 @@ class RelationTest < ActiveRecord::TestCase assert posts.first.author end - assert_queries(1) do + assert_queries(ActiveRecord::IdentityMap.enabled? ? 1 : 2) do posts = Post.preload(:author).to_a assert posts.first.author end - assert_queries(1) do + assert_queries(ActiveRecord::IdentityMap.enabled? ? 2 : 3) do posts = Post.preload(:author, :comments).to_a assert posts.first.author assert posts.first.comments.first @@ -313,7 +313,7 @@ class RelationTest < ActiveRecord::TestCase assert posts.first.comments.first end - assert_queries(1) do + assert_queries(ActiveRecord::IdentityMap.enabled? ? 1 : 2) do posts = Post.scoped.includes(:comments) assert posts.first.comments.first end @@ -323,7 +323,7 @@ class RelationTest < ActiveRecord::TestCase assert posts.first.author end - assert_queries(1) do + assert_queries(ActiveRecord::IdentityMap.enabled? ? 2 : 3) do posts = Post.includes(:author, :comments).to_a assert posts.first.author assert posts.first.comments.first |