diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-08-15 07:06:43 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-08-15 07:06:43 +0000 |
commit | 212f7ffe588ec7aa679fe5ebf34f4887a48885bb (patch) | |
tree | 3a09e5ac501c5abdd66f2e87e28a123339e04a78 /test | |
parent | eac2974e715b1df0acc81748d8154397dfaa030c (diff) | |
download | redmine-212f7ffe588ec7aa679fe5ebf34f4887a48885bb.tar.gz redmine-212f7ffe588ec7aa679fe5ebf34f4887a48885bb.zip |
Use same logic for finding user when importing a file (#950).
git-svn-id: http://svn.redmine.org/redmine/trunk@14501 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/fixtures/files/import_issues.csv | 8 | ||||
-rw-r--r-- | test/unit/issue_import_test.rb | 9 |
2 files changed, 13 insertions, 4 deletions
diff --git a/test/fixtures/files/import_issues.csv b/test/fixtures/files/import_issues.csv index e4cb5aa2c..b648a42ba 100644 --- a/test/fixtures/files/import_issues.csv +++ b/test/fixtures/files/import_issues.csv @@ -1,4 +1,4 @@ -priority;subject;description;start_date;due_date;parent;private;progress;custom;version;category -High;First;First description;2015-07-08;2015-08-25;;no;;PostgreSQL;;New category -Normal;Child 1;Child description;;;1;yes;10;MySQL;2.0;New category -Normal;Child of existing issue;Child description;;;#2;no;20;;2.1;Printing +priority;subject;description;start_date;due_date;parent;private;progress;custom;version;category;user +High;First;First description;2015-07-08;2015-08-25;;no;;PostgreSQL;;New category;dlopper +Normal;Child 1;Child description;;;1;yes;10;MySQL;2.0;New category; +Normal;Child of existing issue;Child description;;;#2;no;20;;2.1;Printing; diff --git a/test/unit/issue_import_test.rb b/test/unit/issue_import_test.rb index 7d0a7b9e1..ec0b57b38 100644 --- a/test/unit/issue_import_test.rb +++ b/test/unit/issue_import_test.rb @@ -69,6 +69,15 @@ class IssueImportTest < ActiveSupport::TestCase assert_equal 2, issues[2].parent_id end + def test_assignee_should_be_set + import = generate_import_with_mapping + import.mapping.merge!('assigned_to' => '11') + import.save! + + issues = new_records(Issue, 3) { import.run } + assert_equal [User.find(3), nil, nil], issues.map(&:assigned_to) + end + def test_is_private_should_be_set_based_on_user_locale import = generate_import_with_mapping import.mapping.merge!('is_private' => '6') |