summaryrefslogtreecommitdiffstats
path: root/test/object_helpers.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-07-14 16:20:44 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-07-14 16:20:44 +0000
commit9f7901e3642bbeb2bf3b5feaefaa10157b111732 (patch)
treedf869bd2eaae5c8055a9fda3095a088c80535a11 /test/object_helpers.rb
parent58c5c29c1faf12d0f4670966220ef74277d98ecb (diff)
downloadredmine-9f7901e3642bbeb2bf3b5feaefaa10157b111732.tar.gz
redmine-9f7901e3642bbeb2bf3b5feaefaa10157b111732.zip
Fixed that query roles are not copied when copying a project (#17202).
git-svn-id: http://svn.redmine.org/redmine/trunk@13329 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/object_helpers.rb')
-rw-r--r--test/object_helpers.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/object_helpers.rb b/test/object_helpers.rb
index 1f58baf9e..4e4a9fba3 100644
--- a/test/object_helpers.rb
+++ b/test/object_helpers.rb
@@ -178,6 +178,14 @@ module ObjectHelpers
changeset.save!
changeset
end
+
+ def Query.generate!(attributes={})
+ query = new(attributes)
+ query.name = "Generated query" if query.name.blank?
+ query.user ||= User.find(1)
+ query.save!
+ query
+ end
end
module IssueObjectHelpers