From 498d8ff72eded86fb1064205332e0a91b1dacece Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Fri, 14 Sep 2007 07:29:22 +0000 Subject: Fix association writer with :dependent => :nullify. Closes #7314. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7477 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/associations_test.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'activerecord/test') 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) -- cgit v1.2.3