diff options
author | Arthur Neves <arthurnn@gmail.com> | 2013-09-30 17:15:07 -0400 |
---|---|---|
committer | Arthur Neves <arthurnn@gmail.com> | 2013-09-30 17:20:26 -0400 |
commit | 679860400f1c6c542b33e8c80221cc5aca7b5629 (patch) | |
tree | a8cf48bfaa9e85439854f89e5cb675df63374740 /activerecord/test/cases/associations/inverse_associations_test.rb | |
parent | 54c05acdba138f3a7a3d44dfc922b0fe4e4cf554 (diff) | |
download | rails-679860400f1c6c542b33e8c80221cc5aca7b5629.tar.gz rails-679860400f1c6c542b33e8c80221cc5aca7b5629.tar.bz2 rails-679860400f1c6c542b33e8c80221cc5aca7b5629.zip |
Move set_inverse_instance to association.build_record
[fixes #10371]
Diffstat (limited to 'activerecord/test/cases/associations/inverse_associations_test.rb')
-rw-r--r-- | activerecord/test/cases/associations/inverse_associations_test.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/test/cases/associations/inverse_associations_test.rb b/activerecord/test/cases/associations/inverse_associations_test.rb index 0cab6faa25..51e466ecac 100644 --- a/activerecord/test/cases/associations/inverse_associations_test.rb +++ b/activerecord/test/cases/associations/inverse_associations_test.rb @@ -125,8 +125,10 @@ class InverseHasOneTests < ActiveRecord::TestCase end def test_parent_instance_should_be_shared_with_newly_created_child - m = Man.find(:first) + m = Man.create f = m.create_face(:description => 'haunted') + + assert_equal m.object_id, f.man.object_id assert_not_nil f.man assert_equal m.name, f.man.name, "Name of man should be the same before changes to parent instance" m.name = 'Bongo' |