Skip to content

Commit

Permalink
Merge pull request rails#2183 from castlerock/3-0-stable-duplicate_test
Browse files Browse the repository at this point in the history
3 0 stable duplicate test
  • Loading branch information
spastorino committed Jul 22, 2011
2 parents 80b1f9e + bd804d7 commit c39bd5f
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions activerecord/test/cases/nested_attributes_test.rb
Expand Up @@ -147,14 +147,6 @@ def test_destroy_works_independent_of_reject_if
assert man.reload.interests.empty?
end

def test_has_many_association_updating_a_single_record
Man.accepts_nested_attributes_for(:interests)
man = Man.create(:name => 'John')
interest = man.interests.create(:topic => 'photography')
man.update_attributes({:interests_attributes => {:topic => 'gardening', :id => interest.id}})
assert_equal 'gardening', interest.reload.topic
end

def test_reject_if_with_blank_nested_attributes_id
# When using a select list to choose an existing 'ship' id, with :include_blank => true
Pirate.accepts_nested_attributes_for :ship, :reject_if => proc {|attributes| attributes[:id].blank? }
Expand Down

0 comments on commit c39bd5f

Please sign in to comment.