summaryrefslogtreecommitdiffstats
path: root/test/object_helpers.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-01-12 12:38:45 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-01-12 12:38:45 +0000
commit14b09361e4a94e8cb28c6572e98231e282e350c8 (patch)
tree6a92828fac5ed8c9ec07c203cb3d74d78f452cbf /test/object_helpers.rb
parentcd9923e39165dbd4003ce893ce846bb857f91f35 (diff)
downloadredmine-14b09361e4a94e8cb28c6572e98231e282e350c8.tar.gz
redmine-14b09361e4a94e8cb28c6572e98231e282e350c8.zip
Adds issue custom fields to time entries filters (#10191).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11171 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/object_helpers.rb')
-rw-r--r--test/object_helpers.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/object_helpers.rb b/test/object_helpers.rb
index 575c9f233..254b6040e 100644
--- a/test/object_helpers.rb
+++ b/test/object_helpers.rb
@@ -98,6 +98,17 @@ module ObjectHelpers
version
end
+ def TimeEntry.generate!(attributes={})
+ entry = TimeEntry.new(attributes)
+ entry.user ||= User.find(2)
+ entry.issue ||= Issue.find(1)
+ entry.project ||= entry.issue.project
+ entry.activity ||= TimeEntryActivity.first
+ entry.spent_on ||= Date.today
+ entry.save!
+ entry
+ end
+
def AuthSource.generate!(attributes={})
@generated_auth_source_name ||= 'Auth 0'
@generated_auth_source_name.succ!