diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-09-09 10:11:49 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-09-09 10:11:49 +0000 |
commit | ff86c37ed33029e25f5cfd90fce2e447471847e3 (patch) | |
tree | 6c8e14d43cd874523843b09994303bdc150ca7eb /test/unit | |
parent | 5e9320137b094910860a72bf3cd469ee6cae8b75 (diff) | |
download | redmine-ff86c37ed33029e25f5cfd90fce2e447471847e3.tar.gz redmine-ff86c37ed33029e25f5cfd90fce2e447471847e3.zip |
Fixed: Issues associated with a locked version are not copied when copying a project (#11207).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10334 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/project_test.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/unit/project_test.rb b/test/unit/project_test.rb index fac2307ed..7910707b2 100644 --- a/test/unit/project_test.rb +++ b/test/unit/project_test.rb @@ -823,6 +823,27 @@ class ProjectTest < ActiveSupport::TestCase assert_equal "Closed", copied_issue.status.name end + should "copy issues assigned to a locked version" do + User.current = User.find(1) + assigned_version = Version.generate!(:name => "Assigned Issues") + @source_project.versions << assigned_version + Issue.generate_for_project!(@source_project, + :fixed_version_id => assigned_version.id, + :subject => "copy issues assigned to a locked version", + :tracker_id => 1, + :project_id => @source_project.id) + assigned_version.update_attribute :status, 'locked' + + assert @project.copy(@source_project) + @project.reload + copied_issue = @project.issues.first(:conditions => {:subject => "copy issues assigned to a locked version"}) + + assert copied_issue + assert copied_issue.fixed_version + assert_equal "Assigned Issues", copied_issue.fixed_version.name # Same name + assert_equal 'locked', copied_issue.fixed_version.status + end + should "change the new issues to use the copied version" do User.current = User.find(1) assigned_version = Version.generate!(:name => "Assigned Issues", :status => 'open') |