diff options
Diffstat (limited to 'activerecord/test/associations_test.rb')
-rwxr-xr-x | activerecord/test/associations_test.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/test/associations_test.rb b/activerecord/test/associations_test.rb index 4a2779227d..b35aadf4ff 100755 --- a/activerecord/test/associations_test.rb +++ b/activerecord/test/associations_test.rb @@ -94,7 +94,8 @@ class HasOneAssociationsTest < Test::Unit::TestCase @signals37.account = nil @signals37.save assert_nil @signals37.account - assert_nil Account.find(old_account_id).firm_id + # account is dependent, therefore is destroyed when reference to owner is lost + assert_raises(ActiveRecord::RecordNotFound) { Account.find(old_account_id) } end def test_dependence |