r3657@asus: jeremy | 2005-09-28 00:32:33 -0700

Also test that client.firm_id.nil? after firm.clients.clear when clients is not :dependent


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2385 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Jeremy Kemper 2005-09-28 04:00:59 +00:00
parent efaf2af07c
commit dd21e9ae39
1 changed files with 3 additions and 1 deletions

View File

@ -519,7 +519,9 @@ class HasManyAssociationsTest < Test::Unit::TestCase
assert_equal [], Client.destroyed_client_ids[firm.id]
# Should not be destroyed since the association is not dependent.
assert_not_nil Client.find_by_id(client_id)
assert_nothing_raised do
assert Client.find(client_id).firm.nil?
end
end
def test_clearing_a_dependent_association_collection