diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-09-08 05:34:07 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-09-08 05:34:07 +0000 |
commit | 5003927f13f54850ca9eeac48e353df5e4e325a1 (patch) | |
tree | 6af9692d3604e9520af7268f14b728eeed87a120 /test/object_helpers.rb | |
parent | ffcf1925e3974e2907aa7baa180bbb2a71952a9d (diff) | |
download | redmine-5003927f13f54850ca9eeac48e353df5e4e325a1.tar.gz redmine-5003927f13f54850ca9eeac48e353df5e4e325a1.zip |
Option to copy subtasks when copying issue(s) (#6965).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10327 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/object_helpers.rb')
-rw-r--r-- | test/object_helpers.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/object_helpers.rb b/test/object_helpers.rb index 42dfdecda..0100a8bed 100644 --- a/test/object_helpers.rb +++ b/test/object_helpers.rb @@ -81,6 +81,15 @@ module ObjectHelpers issue end + # Generates an issue with some children and a grandchild + def Issue.generate_with_descendants!(project, attributes={}) + issue = Issue.generate_for_project!(project, attributes) + child = Issue.generate_for_project!(project, :subject => 'Child1', :parent_issue_id => issue.id) + Issue.generate_for_project!(project, :subject => 'Child2', :parent_issue_id => issue.id) + Issue.generate_for_project!(project, :subject => 'Child11', :parent_issue_id => child.id) + issue.reload + end + def Version.generate!(attributes={}) @generated_version_name ||= 'Version 0' @generated_version_name.succ! |