Commit d58a5daa34d7e7ed54f9728236cc7ae3ec6e0e73
Committed by
Antonio Terceiro
1 parent
86364a8c
Exists in
master
and in
29 other branches
Don't set a person object before saving the user.
Instead, update the automatically created person object with the desired data afterwards.
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
test/test_helper.rb
... | ... | @@ -87,8 +87,8 @@ class Test::Unit::TestCase |
87 | 87 | :password_confirmation => name.underscore |
88 | 88 | }.merge(options) |
89 | 89 | user = User.new(data) |
90 | - user.build_person(person_data.merge(person_options)) | |
91 | 90 | user.save! |
91 | + user.person.update_attributes!(person_data.merge(person_options)) | |
92 | 92 | user |
93 | 93 | end |
94 | 94 | ... | ... |