mirror of
https://github.com/redmine/redmine.git
synced 2025-11-05 04:45:57 +01:00
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:
@@ -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!
|
||||
|
||||
Reference in New Issue
Block a user