summaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2018-11-29 16:06:52 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2018-11-29 16:06:52 +0000
commit0fac1a54402ca128231302015bf990699f2df426 (patch)
treeee833931f1998d47e0795c6d932d5cca19a45836 /test/unit
parent4f8b039ef6144b5a3c25105cfe27f71db4c51721 (diff)
downloadredmine-0fac1a54402ca128231302015bf990699f2df426.tar.gz
redmine-0fac1a54402ca128231302015bf990699f2df426.zip
Adds a test for #30001.
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@17659 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/issue_import_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/unit/issue_import_test.rb b/test/unit/issue_import_test.rb
index bcbf942ae..4a038a170 100644
--- a/test/unit/issue_import_test.rb
+++ b/test/unit/issue_import_test.rb
@@ -217,4 +217,16 @@ class IssueImportTest < ActiveSupport::TestCase
import.run
assert !File.exists?(file_path)
end
+
+ def test_run_should_consider_project_shared_versions
+ system_version = Version.generate!(:project_id => 2, :sharing => 'system', :name => '2.1')
+ system_version.save!
+
+ import = generate_import_with_mapping
+ import.mapping.merge!('fixed_version' => '9')
+ import.save!
+
+ issues = new_records(Issue, 3) { import.run }
+ assert [nil, 3, system_version.id], issues.map(&:fixed_version_id)
+ end
end