diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-08-15 09:15:13 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-08-15 09:15:13 +0000 |
commit | f820ccce3b02416c3b8ab5744eb262684040045d (patch) | |
tree | 121e8233ee5fd54155182b978613e636b7c4e8e5 /test/unit/issue_import_test.rb | |
parent | 9c8c1cdb542895c7dfc868d929dee6e3a579dd5a (diff) | |
download | redmine-f820ccce3b02416c3b8ab5744eb262684040045d.tar.gz redmine-f820ccce3b02416c3b8ab5744eb262684040045d.zip |
Use same logic for finding user as a custom field (#950).
git-svn-id: http://svn.redmine.org/redmine/trunk@14503 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/issue_import_test.rb')
-rw-r--r-- | test/unit/issue_import_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/unit/issue_import_test.rb b/test/unit/issue_import_test.rb index ec0b57b38..1cc8a5e69 100644 --- a/test/unit/issue_import_test.rb +++ b/test/unit/issue_import_test.rb @@ -78,6 +78,16 @@ class IssueImportTest < ActiveSupport::TestCase assert_equal [User.find(3), nil, nil], issues.map(&:assigned_to) end + def test_user_custom_field_should_be_set + field = IssueCustomField.generate!(:field_format => 'user', :is_for_all => true, :trackers => Tracker.all) + import = generate_import_with_mapping + import.mapping.merge!("cf_#{field.id}" => '11') + import.save! + + issues = new_records(Issue, 3) { import.run } + assert_equal '3', issues.first.custom_field_value(field) + end + def test_is_private_should_be_set_based_on_user_locale import = generate_import_with_mapping import.mapping.merge!('is_private' => '6') |