diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-09-20 20:25:16 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-09-20 20:25:16 +0000 |
commit | aa096cb0cc96c0b7f12274dcf7bbd3d8e3e44948 (patch) | |
tree | 7a38acc0c27bfd0087a395d8da7b48ae4f2992ff /test/functional | |
parent | 71e04370d8225aeedaee67049cbec4d8ecf4891e (diff) | |
download | redmine-aa096cb0cc96c0b7f12274dcf7bbd3d8e3e44948.tar.gz redmine-aa096cb0cc96c0b7f12274dcf7bbd3d8e3e44948.zip |
Project copy does not copy custom field settings (#20360).
git-svn-id: http://svn.redmine.org/redmine/trunk@14618 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/projects_controller_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb index 0bf3cf9a5..cfc93face 100644 --- a/test/functional/projects_controller_test.rb +++ b/test/functional/projects_controller_test.rb @@ -608,6 +608,20 @@ class ProjectsControllerTest < ActionController::TestCase assert_response 404 end + def test_get_copy_should_preselect_custom_fields + field1 = IssueCustomField.generate!(:is_for_all => false) + field2 = IssueCustomField.generate!(:is_for_all => false) + source = Project.generate!(:issue_custom_fields => [field1]) + @request.session[:user_id] = 1 + + get :copy, :id => source.id + assert_response :success + assert_select 'fieldset#project_issue_custom_fields' do + assert_select 'input[type=checkbox][value=?][checked=checked]', field1.id.to_s + assert_select 'input[type=checkbox][value=?]:not([checked])', field2.id.to_s + end + end + def test_post_copy_should_copy_requested_items @request.session[:user_id] = 1 # admin CustomField.delete_all |