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:
parent
92cf133788
commit
5b66fba60f
1 changed files with 1 additions and 1 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue