summaryrefslogtreecommitdiffstats
path: root/test/object_helpers.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-10-30 12:59:48 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-10-30 12:59:48 +0000
commitfac0f7f38b1d32a82c2e6789819e349c9d313d44 (patch)
tree33b292fde9e3325a455e6636fd120d10d30e5843 /test/object_helpers.rb
parent27b65d53ac66e67692edcc4ec591c2da92ad4d66 (diff)
downloadredmine-fac0f7f38b1d32a82c2e6789819e349c9d313d44.tar.gz
redmine-fac0f7f38b1d32a82c2e6789819e349c9d313d44.zip
Adds tests for default custom field value (#21074).
git-svn-id: http://svn.redmine.org/redmine/trunk@14768 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/object_helpers.rb')
-rw-r--r--test/object_helpers.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/object_helpers.rb b/test/object_helpers.rb
index 905ab0998..66334f63a 100644
--- a/test/object_helpers.rb
+++ b/test/object_helpers.rb
@@ -190,6 +190,13 @@ module ObjectHelpers
field
end
+ def IssueCustomField.generate!(attributes={})
+ super do |field|
+ field.is_for_all = true unless attributes.key?(:is_for_all)
+ field.tracker_ids = Tracker.all.ids unless attributes.key?(:tracker_ids) || attributes.key?(:trackers)
+ end
+ end
+
def Changeset.generate!(attributes={})
@generated_changeset_rev ||= '123456'
@generated_changeset_rev.succ!