diff options
author | Richard Millan <richardiux@gmail.com> | 2011-05-06 10:05:43 -0700 |
---|---|---|
committer | Richard Millan <richardiux@gmail.com> | 2011-05-06 10:05:43 -0700 |
commit | fc2823a85c8c5e4c0415fbb6b9e7d01f020b3036 (patch) | |
tree | bf37f7d3d04902ef6eddb69a8b7fd271eb7d0a99 /activerecord/test | |
parent | d53b406a76db291f9d1ef15685f87a0977f16c89 (diff) | |
download | rails-fc2823a85c8c5e4c0415fbb6b9e7d01f020b3036.tar.gz rails-fc2823a85c8c5e4c0415fbb6b9e7d01f020b3036.tar.bz2 rails-fc2823a85c8c5e4c0415fbb6b9e7d01f020b3036.zip |
Adding base method symbolized_sti_name to activerecord base to be used on identity map. Identity map now considers the inheritance when creating the caching keys
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/identity_map_test.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/activerecord/test/cases/identity_map_test.rb b/activerecord/test/cases/identity_map_test.rb index c183690187..a0e16400d2 100644 --- a/activerecord/test/cases/identity_map_test.rb +++ b/activerecord/test/cases/identity_map_test.rb @@ -143,8 +143,9 @@ class IdentityMapTest < ActiveRecord::TestCase def test_inherited_with_type_attribute_without_identity_map ActiveRecord::IdentityMap.without do - c1 = comments(:sub_special_comment) - c2 = Comment.find(c1.id) + c = comments(:sub_special_comment) + c1 = SubSpecialComment.find(c.id) + c2 = Comment.find(c.id) assert_same(c1.class, c2.class) end end @@ -156,8 +157,9 @@ class IdentityMapTest < ActiveRecord::TestCase end def test_inherited_with_type_attribute - c1 = comments(:sub_special_comment) - c2 = Comment.find(c1.id) + c = comments(:sub_special_comment) + c1 = SubSpecialComment.find(c.id) + c2 = Comment.find(c.id) assert_same(c1, c2) end |