From f6cf0e72871f9a635eaa95392fefdf48e07728b1 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Sun, 3 Nov 2024 05:51:52 +0000 Subject: Merged r23178 from trunk to 5.1-stable (#41465). git-svn-id: https://svn.redmine.org/redmine/branches/5.1-stable@23179 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/imports_controller_test.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test') diff --git a/test/functional/imports_controller_test.rb b/test/functional/imports_controller_test.rb index c368b64b9..1a49010d2 100644 --- a/test/functional/imports_controller_test.rb +++ b/test/functional/imports_controller_test.rb @@ -52,6 +52,18 @@ class ImportsControllerTest < Redmine::ControllerTest assert_select 'input[name=?][type=?][value=?]', 'project_id', 'hidden', 'subproject1' end + def test_new_issue_import_without_add_issues_permission + Role.all.map { |role| role.remove_permission! :add_issues } + get(:new, :params => {:type => 'IssueImport', :project_id => 'subproject1'}) + assert_response :forbidden + end + + def test_new_time_entry_import_without_log_time_permission + Role.all.map { |role| role.remove_permission! :log_time } + get(:new, :params => {:type => 'TimeEntryImport', :project_id => 'subproject1'}) + assert_response :forbidden + end + def test_create_should_save_the_file import = new_record(Import) do post( -- cgit v1.2.3