diff options
author | Michael Koziarski <michael@koziarski.com> | 2007-10-10 06:45:13 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2007-10-10 06:45:13 +0000 |
commit | 1c881ca5bfc36689b4918edf497b38d24df7b57e (patch) | |
tree | d2b70c2ea0ffeafb40d194129e9cdee8f2bd2481 /activerecord/test/associations_test.rb | |
parent | 4db4661a67529d6238ed255cd51d42d6f68306e1 (diff) | |
download | rails-1c881ca5bfc36689b4918edf497b38d24df7b57e.tar.gz rails-1c881ca5bfc36689b4918edf497b38d24df7b57e.tar.bz2 rails-1c881ca5bfc36689b4918edf497b38d24df7b57e.zip |
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
Diffstat (limited to 'activerecord/test/associations_test.rb')
-rwxr-xr-x | activerecord/test/associations_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
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 |