diff options
author | Go MAEDA <maeda@farend.jp> | 2018-06-03 01:25:18 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2018-06-03 01:25:18 +0000 |
commit | 701cb251c800522eb55c49f498591062fbc85a43 (patch) | |
tree | 7d4dbdcd4cdf5cc1a628dafa502f52c39db35a1e /test/functional/projects_controller_test.rb | |
parent | 795bdb9ee57c4ec75bf37dcec20bddeba5a258cf (diff) | |
download | redmine-701cb251c800522eb55c49f498591062fbc85a43.tar.gz redmine-701cb251c800522eb55c49f498591062fbc85a43.zip |
Tests for r17359 (#28693).
Patch by Mizuki ISHIKAWA.
git-svn-id: http://svn.redmine.org/redmine/trunk@17360 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/projects_controller_test.rb')
-rw-r--r-- | test/functional/projects_controller_test.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb index 77480894a..201473980 100644 --- a/test/functional/projects_controller_test.rb +++ b/test/functional/projects_controller_test.rb @@ -656,6 +656,28 @@ class ProjectsControllerTest < Redmine::ControllerTest assert_select "tr#member-#{member.id}" end + def test_settings_should_show_tabs_depending_on_permission + @request.session[:user_id] = 3 + role = User.find(3).roles.first + + role.permissions = [] + role.save + get :settings, :params => { + :id => 'ecookbook' + } + assert_response 403 + + role.add_permission! :manage_repository, :manage_boards, :manage_project_activities + get :settings, :params => { + :id => 'ecookbook' + } + assert_response :success + assert_select 'a[id^=tab-]', 3 + assert_select 'a#tab-repositories' + assert_select 'a#tab-boards' + assert_select 'a#tab-activities' + end + def test_update @request.session[:user_id] = 2 # manager post :update, :params => { |