From c7b7eb365a16d6f4fc3a031ba1033763dc73694d Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Wed, 12 Jan 2022 14:07:42 +0000 Subject: Merged r21357 from trunk to 4.2-stable (#35090). git-svn-id: http://svn.redmine.org/redmine/branches/4.2-stable@21360 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/issues_controller_test.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'test/functional') diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 2a4fc6d5b..59d071b0a 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -2005,6 +2005,22 @@ class IssuesControllerTest < Redmine::ControllerTest assert_select '#content a.new-issue[href="/issues/new"]', :text => 'New issue' end + def test_index_should_show_setting_link_with_edit_project_permission + role = Role.find(1) + role.add_permission! :edit_project + @request.session[:user_id] = 2 + get(:index, :params => {:project_id => 1}) + assert_select '#content a.icon-settings[href="/projects/ecookbook/settings/issues"]', 1 + end + + def test_index_should_not_show_setting_link_without_edit_project_permission + role = Role.find(1) + role.remove_permission! :edit_project + @request.session[:user_id] = 2 + get(:index, :params => {:project_id => 1}) + assert_select '#content a.icon-settings[href="/projects/ecookbook/settings/issues"]', 0 + end + def test_index_should_not_include_new_issue_tab_when_disabled with_settings :new_item_menu_tab => '0' do @request.session[:user_id] = 2 -- cgit v1.2.3