From 1c881ca5bfc36689b4918edf497b38d24df7b57e Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Wed, 10 Oct 2007 06:45:13 +0000 Subject: Ensure that 'autosaving' works when associations aren't loaded [Bryan Helmkamp] References #8713 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7824 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/test/associations_test.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord/test/associations_test.rb') diff --git a/activerecord/test/associations_test.rb b/activerecord/test/associations_test.rb index 37e26ef80a..9e4d0f2711 100755 --- a/activerecord/test/associations_test.rb +++ b/activerecord/test/associations_test.rb @@ -101,6 +101,10 @@ class AssociationProxyTest < Test::Unit::TestCase assert !david.projects.loaded? end + def test_save_on_parent_saves_children + developer = Developer.create :name => "Bryan", :salary => 50_000 + assert_equal 1, developer.reload.audit_logs.size + end end class HasOneAssociationsTest < Test::Unit::TestCase -- cgit v1.2.3