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
This commit is contained in:
Jean-Philippe Lang
2014-12-05 08:10:33 +00:00
parent a942c1c25e
commit 50b12518a1

View File

@@ -2632,6 +2632,18 @@ class IssuesControllerTest < ActionController::TestCase
end end
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 def test_create_as_copy_should_copy_subtasks
@request.session[:user_id] = 2 @request.session[:user_id] = 2
issue = Issue.generate_with_descendants! issue = Issue.generate_with_descendants!