Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #5504 from arunagw/build_fix_1-8-7

Build fix 1 8 7
  • Loading branch information...
commit 594d6b23d8c3816dd81434bab75a559540d91430 2 parents f12d76b + eeee6f2
José Valim josevalim authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 activerecord/test/cases/nested_attributes_test.rb
6 activerecord/test/cases/nested_attributes_test.rb
View
@@ -616,9 +616,13 @@ def test_should_raise_RecordNotFound_if_an_id_is_given_but_doesnt_return_a_recor
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?
Please sign in to comment.
Something went wrong with that request. Please try again.