summaryrefslogtreecommitdiffstats
path: root/test/object_helpers.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2019-11-02 08:23:35 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2019-11-02 08:23:35 +0000
commit3afd17f83e6cc5c3314c7dab0499d56deda2ec12 (patch)
treea5ba9f0eeda5f38a6dfdd4b05e6849a751759c57 /test/object_helpers.rb
parent7c0ecb4703a16b2c4345e8abd7150412ea86d1ce (diff)
downloadredmine-3afd17f83e6cc5c3314c7dab0499d56deda2ec12.tar.gz
redmine-3afd17f83e6cc5c3314c7dab0499d56deda2ec12.zip
Allow import time entries for other users (#32196).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@18890 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 4f1f4b486..e89e1bd05 100644
--- a/test/object_helpers.rb
+++ b/test/object_helpers.rb
@@ -259,6 +259,14 @@ module ObjectHelpers
import.save!
import
end
+
+ def generate_time_entry_import(fixture_name='import_time_entries.csv')
+ import = TimeEntryImport.new
+ import.user_id = 2
+ import.file = uploaded_test_file(fixture_name, 'text/csv')
+ import.save!
+ import
+ end
end
module TrackerObjectHelpers