diff options
author | Go MAEDA <maeda@farend.jp> | 2019-08-24 08:50:17 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-08-24 08:50:17 +0000 |
commit | 22165fd071227de3f893319974d8568b2fb8ebc1 (patch) | |
tree | 0dc44b75d5a530002b5966eebe2c4f4d3fb66b90 /test | |
parent | 880883229f0e48adc20bdada6f00f8754dfa5cc9 (diff) | |
download | redmine-22165fd071227de3f893319974d8568b2fb8ebc1.tar.gz redmine-22165fd071227de3f893319974d8568b2fb8ebc1.zip |
Per role visibility settings for version custom fields (#23997).
Patch by Jens Krämer and Marius BALTEANU.
git-svn-id: http://svn.redmine.org/redmine/trunk@18386 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/custom_fields_controller_test.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/functional/custom_fields_controller_test.rb b/test/functional/custom_fields_controller_test.rb index 101a4c34f..7f41888ff 100644 --- a/test/functional/custom_fields_controller_test.rb +++ b/test/functional/custom_fields_controller_test.rb @@ -146,6 +146,26 @@ class CustomFieldsControllerTest < Redmine::ControllerTest end end + def test_new_version_custom_field + get :new, :params => { + :type => 'VersionCustomField' + } + assert_response :success + + assert_select 'form#custom_field_form' do + assert_select 'select#custom_field_field_format[name=?]', 'custom_field[field_format]' do + assert_select 'option[value=user]', :text => 'User' + assert_select 'option[value=version]', :text => 'Version' + end + + # Visibility + assert_select 'input[type=radio][name=?]', 'custom_field[visible]', 2 + assert_select 'input[type=checkbox][name=?]', 'custom_field[role_ids][]', 3 + + assert_select 'input[type=hidden][name=type][value=VersionCustomField]' + end + end + def test_new_time_entry_custom_field_should_not_show_trackers_and_projects get :new, :params => { :type => 'TimeEntryCustomField' |