diff options
Diffstat (limited to 'activerecord/test/associations/join_model_test.rb')
-rw-r--r-- | activerecord/test/associations/join_model_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/associations/join_model_test.rb b/activerecord/test/associations/join_model_test.rb index fb8df9c21c..c67956fba3 100644 --- a/activerecord/test/associations/join_model_test.rb +++ b/activerecord/test/associations/join_model_test.rb @@ -137,6 +137,13 @@ class AssociationsJoinModelTest < Test::Unit::TestCase assert_equal "Post", tagging.taggable_type assert_equal old_count+1, posts(:welcome).taggings.count end + + def test_create_bang_polymorphic_with_has_many_scope + old_count = posts(:welcome).taggings.count + tagging = posts(:welcome).taggings.create!(:tag => tags(:misc)) + assert_equal "Post", tagging.taggable_type + assert_equal old_count+1, posts(:welcome).taggings.count + end def test_create_polymorphic_has_one_with_scope old_count = Tagging.count |