diff options
author | Go MAEDA <maeda@farend.jp> | 2019-08-20 01:44:44 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-08-20 01:44:44 +0000 |
commit | 3495cba92bd8a2448381e01056920b48dd882180 (patch) | |
tree | 1abe416e54c45a5b33e5724b1fa356a8ce8378c0 /test/functional/projects_controller_test.rb | |
parent | a1d454a1b18f503a30805a29b55fccecf97e48d7 (diff) | |
download | redmine-3495cba92bd8a2448381e01056920b48dd882180.tar.gz redmine-3495cba92bd8a2448381e01056920b48dd882180.zip |
Per role visibility settings for project custom fields (#31925).
Patch by Jens Krämer and Marius BALTEANU.
git-svn-id: http://svn.redmine.org/redmine/trunk@18379 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/projects_controller_test.rb')
-rw-r--r-- | test/functional/projects_controller_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb index 389ad6c8a..63159ab90 100644 --- a/test/functional/projects_controller_test.rb +++ b/test/functional/projects_controller_test.rb @@ -726,6 +726,18 @@ class ProjectsControllerTest < Redmine::ControllerTest assert_select 'a#tab-activities' end + def test_settings_should_not_display_custom_fields_not_visible_for_user + @request.session[:user_id] = 2 + + ProjectCustomField.find_by_name('Development status').update_attribute :visible, false + get :settings, :params => { + :id => 'ecookbook' + } + assert_response :success + + assert_select 'select#project_custom_field_values_3', :count => 0 + end + def test_update @request.session[:user_id] = 2 # manager post :update, :params => { |