Permalink
Browse files

failing test case for Issue 4718

  • Loading branch information...
1 parent fd3211e commit 4b96dd7962a052af17b9c3a1fe39f4269c4f96c9 @jenslukowski jenslukowski committed Jan 28, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 activerecord/test/cases/identity_map_test.rb
@@ -162,6 +162,14 @@ def test_inherited_with_type_attribute
c2 = Comment.find(c.id)
assert_same(c1, c2)
end
+
+ def test_queries_are_not_executed_when_finding_inherited_class_by_id
+ c = comments(:sub_special_comment)
+ SubSpecialComment.find(c.id)
+ assert_no_queries do
+ SubSpecialComment.find(c.id)
+ end
+ end
##############################################################################
# Tests checking dirty attribute behavior with IM #

0 comments on commit 4b96dd7

Please sign in to comment.