diff options
Diffstat (limited to 'activerecord/test')
-rwxr-xr-x | activerecord/test/associations_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/test/associations_test.rb b/activerecord/test/associations_test.rb index f962537966..5b5066290f 100755 --- a/activerecord/test/associations_test.rb +++ b/activerecord/test/associations_test.rb @@ -345,6 +345,13 @@ class HasOneAssociationsTest < Test::Unit::TestCase firm.destroy end + def test_dependence_with_missing_association_and_nullify + Account.destroy_all + firm = DependentFirm.find(:first) + assert firm.account.nil? + firm.destroy + end + def test_assignment_before_parent_saved firm = Firm.new("name" => "GlobalMegaCorp") firm.account = a = Account.find(1) |