diff options
Diffstat (limited to 'activerecord/test/associations_test.rb')
-rwxr-xr-x | activerecord/test/associations_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/activerecord/test/associations_test.rb b/activerecord/test/associations_test.rb index f99322d976..cb704ffd2e 100755 --- a/activerecord/test/associations_test.rb +++ b/activerecord/test/associations_test.rb @@ -313,6 +313,16 @@ class HasOneAssociationsTest < Test::Unit::TestCase firm.account = Account.find(:first).clone assert_queries(2) { firm.save! } end + + def test_save_still_works_after_accessing_nil_has_one + jp = Company.new :name => 'Jaded Pixel' + jp.dummy_account.nil? + + assert_nothing_raised do + jp.save! + end + end + end |