From 0fac1a54402ca128231302015bf990699f2df426 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 29 Nov 2018 16:06:52 +0000 Subject: [PATCH] Adds a test for #30001. Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@17659 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/issue_import_test.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 -- 2.39.5