diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-01-07 22:19:57 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-01-07 22:19:57 +0000 |
commit | 5d2eea14893b509f0f9044a53270bd84b4e06acb (patch) | |
tree | f213e30964bedf3d39dfd18d3032dd446d8a84a2 /test/object_helpers.rb | |
parent | b7ad1e82cc6b88346b06f178df425667bd95e2c3 (diff) | |
download | redmine-5d2eea14893b509f0f9044a53270bd84b4e06acb.tar.gz redmine-5d2eea14893b509f0f9044a53270bd84b4e06acb.zip |
Cleans up parent project assignment in ProjectsController.
git-svn-id: http://svn.redmine.org/redmine/trunk@13847 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/object_helpers.rb')
-rw-r--r-- | test/object_helpers.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/object_helpers.rb b/test/object_helpers.rb index ca58638d9..2b1fa2f61 100644 --- a/test/object_helpers.rb +++ b/test/object_helpers.rb @@ -40,8 +40,10 @@ module ObjectHelpers end def Project.generate_with_parent!(parent, attributes={}) - project = Project.generate!(attributes) - project.set_parent!(parent) + project = Project.generate!(attributes) do |p| + p.parent = parent + end + parent.reload if parent project end |