Skip to content

Commit

Permalink
Fixing incorrectly writtent testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
anayden authored and tenderlove committed Jan 28, 2011
1 parent e92c2ff commit fa779c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions activerecord/test/cases/nested_attributes_test.rb
Expand Up @@ -151,8 +151,8 @@ def test_reject_if_with_blank_nested_attributes_id
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
Expand Down

0 comments on commit fa779c5

Please sign in to comment.