aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/inverse_associations_test.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-10-10 14:41:37 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-10-10 14:41:37 -0300
commit6a185aa0a849ec7cd8d9536124505f668db11db5 (patch)
tree9cc25b3aa6eafd3bd10fbf298a970c010a41fb80 /activerecord/test/cases/associations/inverse_associations_test.rb
parent9639f65af534f7d9afeb359c30214fd6b4d71694 (diff)
downloadrails-6a185aa0a849ec7cd8d9536124505f668db11db5.tar.gz
rails-6a185aa0a849ec7cd8d9536124505f668db11db5.tar.bz2
rails-6a185aa0a849ec7cd8d9536124505f668db11db5.zip
Revert "Merge pull request #12413 from arthurnn/inverse_of_on_build"
This reverts commit ccd11d58910059f07b28cc518dbdad42cbc8ea0c, reversing changes made to 54c05acdba138f3a7a3d44dfc922b0fe4e4cf554. Reason: This caused a regression when the associated record is created in a before_create callback. See https://github.com/rails/rails/pull/12413#issuecomment-25848163
Diffstat (limited to 'activerecord/test/cases/associations/inverse_associations_test.rb')
-rw-r--r--activerecord/test/cases/associations/inverse_associations_test.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/activerecord/test/cases/associations/inverse_associations_test.rb b/activerecord/test/cases/associations/inverse_associations_test.rb
index 51e466ecac..0cab6faa25 100644
--- a/activerecord/test/cases/associations/inverse_associations_test.rb
+++ b/activerecord/test/cases/associations/inverse_associations_test.rb
@@ -125,10 +125,8 @@ class InverseHasOneTests < ActiveRecord::TestCase
end
def test_parent_instance_should_be_shared_with_newly_created_child
- m = Man.create
+ m = Man.find(:first)
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'