summaryrefslogtreecommitdiffstats
path: root/test/unit/issue_import_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-06-07 18:39:44 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-06-07 18:39:44 +0000
commitf6754a0f7a37973d3f7296d0c75ac8d20204d682 (patch)
treefc8987ba536c7c005c89dfbbdc480da56d019296 /test/unit/issue_import_test.rb
parent90d14b71b3656a8362d7508dd88b2aea43c6fa31 (diff)
downloadredmine-f6754a0f7a37973d3f7296d0c75ac8d20204d682.tar.gz
redmine-f6754a0f7a37973d3f7296d0c75ac8d20204d682.zip
Make Status map-able for CSV import (#22951).
git-svn-id: http://svn.redmine.org/redmine/trunk@15493 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/issue_import_test.rb')
-rw-r--r--test/unit/issue_import_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/unit/issue_import_test.rb b/test/unit/issue_import_test.rb
index 6d39214d5..88da82c88 100644
--- a/test/unit/issue_import_test.rb
+++ b/test/unit/issue_import_test.rb
@@ -89,6 +89,15 @@ class IssueImportTest < ActiveSupport::TestCase
assert_include "Tracker cannot be blank", item.message
end
+ def test_status_should_be_set
+ import = generate_import_with_mapping
+ import.mapping.merge!('status' => '14')
+ import.save!
+
+ issues = new_records(Issue, 3) { import.run }
+ assert_equal ['New', 'New', 'Assigned'], issues.map(&:status).map(&:name)
+ end
+
def test_parent_should_be_set
import = generate_import_with_mapping
import.mapping.merge!('parent_issue_id' => '5')