aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/inverse_associations_test.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-10-03 10:27:58 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2013-10-03 10:27:58 -0700
commitbefeeb2d0aef8db4ba84d1e2fa0d273f8a111363 (patch)
tree70e00f8546f6bb7765474dd792c1d08ed7ecac19 /activerecord/test/cases/associations/inverse_associations_test.rb
parent5aee516b5edb49d7206cd9815c13a78b6b16c5d9 (diff)
parent83c4b0a7f977b75a9005ceb78d8a2a719392d904 (diff)
downloadrails-befeeb2d0aef8db4ba84d1e2fa0d273f8a111363.tar.gz
rails-befeeb2d0aef8db4ba84d1e2fa0d273f8a111363.tar.bz2
rails-befeeb2d0aef8db4ba84d1e2fa0d273f8a111363.zip
Merge branch '3-2-stable' into 3-2-sec
* 3-2-stable: make sure both headers are set before checking for ip spoofing Move set_inverse_instance to association.build_record
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, 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'