diff options
author | Thiago Pradi <tchandy@gmail.com> | 2010-07-25 21:38:15 -0300 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-07-26 17:13:52 +0200 |
commit | f70c0b348d2f703d763a8136df7837567f7cb691 (patch) | |
tree | d5dd4ed065bb93d3eda8037b5a665ae11efb016b /activerecord/test/cases | |
parent | 0e969bdaf8ff2e3384350687aa0b583f94d6dfbc (diff) | |
download | rails-f70c0b348d2f703d763a8136df7837567f7cb691.tar.gz rails-f70c0b348d2f703d763a8136df7837567f7cb691.tar.bz2 rails-f70c0b348d2f703d763a8136df7837567f7cb691.zip |
Removing unnecessary code [#5192 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/autosave_association_test.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/activerecord/test/cases/autosave_association_test.rb b/activerecord/test/cases/autosave_association_test.rb index 3b89c12a3f..08694526af 100644 --- a/activerecord/test/cases/autosave_association_test.rb +++ b/activerecord/test/cases/autosave_association_test.rb @@ -171,7 +171,7 @@ class TestDefaultAutosaveAssociationOnAHasOneAssociation < ActiveRecord::TestCas end class TestDefaultAutosaveAssociationOnABelongsToAssociation < ActiveRecord::TestCase - fixtures :companies + fixtures :companies, :posts, :tags, :taggings def test_should_save_parent_but_not_invalid_child client = Client.new(:name => 'Joe (the Plumber)') @@ -312,6 +312,12 @@ class TestDefaultAutosaveAssociationOnABelongsToAssociation < ActiveRecord::Test assert_equal num_orders +1, Order.count assert_equal num_customers +2, Customer.count end + + def test_store_association_with_a_polymorphic_relationship + num_tagging = Tagging.count + tags(:misc).create_tagging(:taggable => posts(:thinking)) + assert_equal num_tagging +1, Tagging.count + end end class TestDefaultAutosaveAssociationOnAHasManyAssociation < ActiveRecord::TestCase |