aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/identity_map_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/identity_map_test.rb')
-rw-r--r--activerecord/test/cases/identity_map_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/cases/identity_map_test.rb b/activerecord/test/cases/identity_map_test.rb
index 1588633e1d..df77bc5af2 100644
--- a/activerecord/test/cases/identity_map_test.rb
+++ b/activerecord/test/cases/identity_map_test.rb
@@ -39,6 +39,14 @@ class IdentityMapTest < ActiveRecord::TestCase
end
end
+ def test_find_id_use_identity_map
+ ActiveRecord::IdentityMap.enabled = false
+ ActiveRecord::IdentityMap.use do
+ assert_same(Client.find(3), Client.find(3))
+ end
+ ActiveRecord::IdentityMap.enabled = true
+ end
+
def test_find_pkey
assert_same(
Subscriber.find('swistak'),