diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-01-12 12:38:45 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-01-12 12:38:45 +0000 |
commit | 14b09361e4a94e8cb28c6572e98231e282e350c8 (patch) | |
tree | 6a92828fac5ed8c9ec07c203cb3d74d78f452cbf /test/object_helpers.rb | |
parent | cd9923e39165dbd4003ce893ce846bb857f91f35 (diff) | |
download | redmine-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.rb | 11 |
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! |