summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2019-01-12 00:57:27 +0000
committerGo MAEDA <maeda@farend.jp>2019-01-12 00:57:27 +0000
commit0eb5d19a0c3c99e198a560d6056349a3f5ed5242 (patch)
treed9bac3592546e87af05b8a9b0716897a6c16f1fc /test
parentbce44769ffe8286d7b256370656e718cae7e2272 (diff)
downloadredmine-0eb5d19a0c3c99e198a560d6056349a3f5ed5242.tar.gz
redmine-0eb5d19a0c3c99e198a560d6056349a3f5ed5242.zip
Import UTF-8 issue CSV files with BOM and quoted strings (#30412).
Patch by Felix Schäfer. git-svn-id: http://svn.redmine.org/redmine/trunk@17786 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-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 d4b4db69c..fe4a04872 100644
--- a/test/unit/issue_import_test.rb
+++ b/test/unit/issue_import_test.rb
@@ -116,6 +116,15 @@ class IssueImportTest < ActiveSupport::TestCase
assert_equal 2, issues[2].parent_id
end
+ def test_import_utf8_with_bom
+ import = generate_import_with_mapping('import_issues_utf8_with_bom.csv')
+ import.settings.merge!('encoding' => 'UTF-8')
+ import.save
+
+ issues = new_records(Issue,3) { import.run }
+ assert_equal 3, issues.count
+ end
+
def test_backward_and_forward_reference_to_parent_should_work
import = generate_import('import_subtasks.csv')
import.settings = {