Skip to content
Browse files

Add test to show that when IdentityMap is disabled finders returns di…

…fferent objects.
  • Loading branch information...
1 parent f1913ad commit a9edd6cf932b299e28677cb1e0af397c533caffe @miloops miloops committed
Showing with 7 additions and 4 deletions.
  1. +7 −4 activerecord/test/cases/identity_map_test.rb
View
11 activerecord/test/cases/identity_map_test.rb
@@ -26,10 +26,13 @@ class IdentityMapTest < ActiveRecord::TestCase
:posts, :tags, :taggings, :comments, :subscribers
def test_find_id
- assert_same(
- Client.find(3),
- Client.find(3)
- )
+ assert_same(Client.find(3), Client.find(3))
+ end
+
+ def test_find_id_without_identity_map
+ IdentityMap.without do
+ assert_not_same(Client.find(3), Client.find(3))
+ end
end
def test_find_pkey

0 comments on commit a9edd6c

Please sign in to comment.
Something went wrong with that request. Please try again.