diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2010-03-07 21:53:21 -0300 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-03-09 00:11:34 +0100 |
commit | 47d252f9928568620844edce2161acd457c352c0 (patch) | |
tree | d8dce8dbd2c2c973bd792a51dafbc9d0c430a1c3 /activerecord/test/cases/associations/has_one_associations_test.rb | |
parent | 8e9d9232b0c3d96c662762e13848c275a86c0c61 (diff) | |
download | rails-47d252f9928568620844edce2161acd457c352c0.tar.gz rails-47d252f9928568620844edce2161acd457c352c0.tar.bz2 rails-47d252f9928568620844edce2161acd457c352c0.zip |
Fix associations to call :destroy or :delete based on the right :dependent option
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activerecord/test/cases/associations/has_one_associations_test.rb')
-rw-r--r-- | activerecord/test/cases/associations/has_one_associations_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/associations/has_one_associations_test.rb b/activerecord/test/cases/associations/has_one_associations_test.rb index d359ad48c5..d5dbb88886 100644 --- a/activerecord/test/cases/associations/has_one_associations_test.rb +++ b/activerecord/test/cases/associations/has_one_associations_test.rb @@ -14,7 +14,7 @@ class HasOneAssociationsTest < ActiveRecord::TestCase assert_equal companies(:first_firm).account, Account.find(1) assert_equal Account.find(1).credit_limit, companies(:first_firm).account.credit_limit end - + def test_has_one_cache_nils firm = companies(:another_firm) assert_queries(1) { assert_nil firm.account } @@ -96,7 +96,7 @@ class HasOneAssociationsTest < ActiveRecord::TestCase assert_nil Account.find(old_account_id).firm_id end - def test_association_changecalls_delete + def test_association_change_calls_delete companies(:first_firm).deletable_account = Account.new assert_equal [], Account.destroyed_account_ids[companies(:first_firm).id] end |