mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fixing incorrectly writtent testcase
This commit is contained in:
parent
e92c2ffd8e
commit
fa779c5357
1 changed files with 2 additions and 2 deletions
|
@ -151,8 +151,8 @@ class TestNestedAttributesInGeneral < ActiveRecord::TestCase
|
|||
def test_first_and_array_index_zero_methods_return_the_same_value_when_nested_attributes_are_set_to_update_existing_record
|
||||
Man.accepts_nested_attributes_for(:interests)
|
||||
man = Man.create(:name => "John")
|
||||
interest = Interest.create :topic => 'gardning', :man => man
|
||||
man = Man.first
|
||||
interest = man.interests.create :topic => 'gardning'
|
||||
man = Man.find man.id
|
||||
man.interests_attributes = [{:id => interest.id, :topic => 'gardening'}]
|
||||
assert_equal man.interests.first.topic, man.interests[0].topic
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue