diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-04-20 20:06:30 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-04-20 20:06:30 -0700 |
commit | 696375ac628bd41edf3a8c8c00dde196696f4add (patch) | |
tree | 0b8ca850e462d5d2722ea4d2217d9c132a0e3cb1 /activerecord/test/cases/associations/has_many_associations_test.rb | |
parent | 685a53a360d0d8fc4a9f3b49f900621c940a71f2 (diff) | |
parent | b10fb7e7bcb5efea6c93ae52bad125887cfc235c (diff) | |
download | rails-696375ac628bd41edf3a8c8c00dde196696f4add.tar.gz rails-696375ac628bd41edf3a8c8c00dde196696f4add.tar.bz2 rails-696375ac628bd41edf3a8c8c00dde196696f4add.zip |
Merge branch 'master' into cherry
Diffstat (limited to 'activerecord/test/cases/associations/has_many_associations_test.rb')
-rw-r--r-- | activerecord/test/cases/associations/has_many_associations_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/associations/has_many_associations_test.rb b/activerecord/test/cases/associations/has_many_associations_test.rb index 30edf79a26..5df74fcdcd 100644 --- a/activerecord/test/cases/associations/has_many_associations_test.rb +++ b/activerecord/test/cases/associations/has_many_associations_test.rb @@ -719,6 +719,12 @@ class HasManyAssociationsTest < ActiveRecord::TestCase assert Client.find(:all, :conditions => "firm_id=#{firm.id}").empty? end + def test_dependence_for_associations_with_hash_condition + david = authors(:david) + post = posts(:thinking).id + assert_difference('Post.count', -1) { assert david.destroy } + end + def test_destroy_dependent_when_deleted_from_association firm = Firm.find(:first) assert_equal 2, firm.clients.size |