1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix inverse associations test

`InverseHasManyTests#test_parent_instance_should_be_shared_within_create_block_of_new_child`
was mistakenly the same as
`InverseHasManyTests#test_parent_instance_should_be_shared_within_build_block_of_new_child`.
This commit is contained in:
Leandro Facchinetti 2014-06-04 23:17:16 -03:00
parent 92cf133788
commit 5b66fba60f

View file

@ -333,7 +333,7 @@ class InverseHasManyTests < ActiveRecord::TestCase
def test_parent_instance_should_be_shared_within_create_block_of_new_child
man = Man.first
interest = man.interests.build do |i|
interest = man.interests.create do |i|
assert i.man.equal?(man), "Man of child should be the same instance as a parent"
end
assert interest.man.equal?(man), "Man of the child should still be the same instance as a parent"