diff options
Diffstat (limited to 'activerecord/test')
-rwxr-xr-x | activerecord/test/associations_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/associations_test.rb b/activerecord/test/associations_test.rb index 6b97a92612..a1ea3f1c23 100755 --- a/activerecord/test/associations_test.rb +++ b/activerecord/test/associations_test.rb @@ -961,6 +961,11 @@ class HasManyAssociationsTest < Test::Unit::TestCase assert_equal 1, firm.clients.length end + def test_replace_with_less_and_dependent_nullify + num_companies = Company.count + companies(:rails_core).companies = [] + assert_equal num_companies, Company.count + end def test_replace_with_new firm = Firm.find(:first) |