diff options
author | Emilio Tagua <miloops@gmail.com> | 2010-09-15 11:09:30 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2010-11-19 19:07:43 -0300 |
commit | a9edd6cf932b299e28677cb1e0af397c533caffe (patch) | |
tree | 1f29c92e9cddb69b9f55f9cf0a7c0d7f0ea87c42 /activerecord/test/cases | |
parent | f1913ad835abce53b5365c11c9d13975c1d8ba46 (diff) | |
download | rails-a9edd6cf932b299e28677cb1e0af397c533caffe.tar.gz rails-a9edd6cf932b299e28677cb1e0af397c533caffe.tar.bz2 rails-a9edd6cf932b299e28677cb1e0af397c533caffe.zip |
Add test to show that when IdentityMap is disabled finders returns different objects.
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/identity_map_test.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/activerecord/test/cases/identity_map_test.rb b/activerecord/test/cases/identity_map_test.rb index df43d8c4f4..c51bdf5f69 100644 --- a/activerecord/test/cases/identity_map_test.rb +++ b/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 |