Merge pull request #5081 from arunagw/fix_ar_test

Fix ar test
This commit is contained in:
Xavier Noria
2012-02-18 04:52:31 -08:00

View File

@@ -624,9 +624,13 @@ module NestedAttributesOnACollectionAssociationTests
end
def test_should_automatically_build_new_associated_models_for_each_entry_in_a_hash_where_the_id_is_missing
attributes = ActiveSupport::OrderedHash.new
attributes['foo'] = { :name => 'Grace OMalley' }
attributes['bar'] = { :name => 'Privateers Greed' }
@pirate.send(@association_name).destroy_all
@pirate.reload.attributes = {
association_getter => { 'foo' => { :name => 'Grace OMalley' }, 'bar' => { :name => 'Privateers Greed' }}
association_getter => attributes
}
assert !@pirate.send(@association_name).first.persisted?