diff options
author | Go MAEDA <maeda@farend.jp> | 2018-06-03 03:42:50 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2018-06-03 03:42:50 +0000 |
commit | c7d52e7c55f2824d181b28f5e064eef0fd00a68b (patch) | |
tree | 9da98d165b02d80dbb1cdc949b1b57da4e81a303 /test/functional/projects_controller_test.rb | |
parent | 701cb251c800522eb55c49f498591062fbc85a43 (diff) | |
download | redmine-c7d52e7c55f2824d181b28f5e064eef0fd00a68b.tar.gz redmine-c7d52e7c55f2824d181b28f5e064eef0fd00a68b.zip |
Fix improper way of getting roles in test_settings_should_show_tabs_depending_on_permission (#28693).
git-svn-id: http://svn.redmine.org/redmine/trunk@17362 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/projects_controller_test.rb')
-rw-r--r-- | test/functional/projects_controller_test.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb index 201473980..68265ad05 100644 --- a/test/functional/projects_controller_test.rb +++ b/test/functional/projects_controller_test.rb @@ -658,18 +658,19 @@ class ProjectsControllerTest < Redmine::ControllerTest def test_settings_should_show_tabs_depending_on_permission @request.session[:user_id] = 3 - role = User.find(3).roles.first + project = Project.find(1) + role = User.find(3).roles_for_project(project).first role.permissions = [] role.save get :settings, :params => { - :id => 'ecookbook' + :id => project.id } assert_response 403 role.add_permission! :manage_repository, :manage_boards, :manage_project_activities get :settings, :params => { - :id => 'ecookbook' + :id => project.id } assert_response :success assert_select 'a[id^=tab-]', 3 |