diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-10-12 08:56:09 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-10-12 08:56:09 +0000 |
commit | 51818cbbb6bc36f773eb9e225e070d0492b0ac36 (patch) | |
tree | bb9e995f91512e9b8401f2e28508674abc6ed073 /test/object_helpers.rb | |
parent | 8bde60dc56e47316aa6dbd22ab75a305c1dfc9ae (diff) | |
download | redmine-51818cbbb6bc36f773eb9e225e070d0492b0ac36.tar.gz redmine-51818cbbb6bc36f773eb9e225e070d0492b0ac36.zip |
Makes Issue.generate_with_descendants! helper accept attributes only.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10612 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/object_helpers.rb')
-rw-r--r-- | test/object_helpers.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/object_helpers.rb b/test/object_helpers.rb index 2c224bcfc..575c9f233 100644 --- a/test/object_helpers.rb +++ b/test/object_helpers.rb @@ -70,12 +70,12 @@ module ObjectHelpers issue end - # Generates an issue with some children and a grandchild - def Issue.generate_with_descendants!(project, attributes={}) - issue = Issue.generate!(attributes.merge(:project => project)) - child = Issue.generate!(:project => project, :subject => 'Child1', :parent_issue_id => issue.id) - Issue.generate!(:project => project, :subject => 'Child2', :parent_issue_id => issue.id) - Issue.generate!(:project => project, :subject => 'Child11', :parent_issue_id => child.id) + # Generates an issue with 2 children and a grandchild + def Issue.generate_with_descendants!(attributes={}) + issue = Issue.generate!(attributes) + child = Issue.generate!(:project => issue.project, :subject => 'Child1', :parent_issue_id => issue.id) + Issue.generate!(:project => issue.project, :subject => 'Child2', :parent_issue_id => issue.id) + Issue.generate!(:project => issue.project, :subject => 'Child11', :parent_issue_id => child.id) issue.reload end |