From 50b12518a1962c9ca56e2c3d878e86190861b8e5 2014-12-05 08:10:33 From: Jean-Philippe Lang Date: 2014-12-05 08:10:33 Subject: [PATCH] Adds a test for when link_copied_issue setting is set to "never". git-svn-id: http://svn.redmine.org/redmine/trunk@13705 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 876a637..566cf3e 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -2632,6 +2632,18 @@ class IssuesControllerTest < ActionController::TestCase end end + def test_create_as_copy_should_never_add_relation_with_copied_issue_by_setting + with_settings :link_copied_issue => 'no' do + @request.session[:user_id] = 2 + assert_difference 'Issue.count' do + assert_no_difference 'IssueRelation.count' do + post :create, :project_id => 1, :copy_from => 1, :link_copy => '1', + :issue => {:subject => 'Copy'} + end + end + end + end + def test_create_as_copy_should_copy_subtasks @request.session[:user_id] = 2 issue = Issue.generate_with_descendants!