From d38f97ce473467e5089f46af3eca4103898be8e5 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Wed, 10 Aug 2022 01:34:37 +0000 Subject: POST Requests to repository WS fail with "Can't verify CSRF token authenticity" (#37562). Patch by Go MAEDA. git-svn-id: https://svn.redmine.org/redmine/trunk@21766 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/sys_controller_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/functional') diff --git a/test/functional/sys_controller_test.rb b/test/functional/sys_controller_test.rb index edc5c4945..5a6741fd8 100644 --- a/test/functional/sys_controller_test.rb +++ b/test/functional/sys_controller_test.rb @@ -143,4 +143,11 @@ class SysControllerTest < Redmine::ControllerTest assert_include 'Access denied', response.body end end + + def test_should_skip_verify_authenticity_token + ActionController::Base.allow_forgery_protection = true + assert_nothing_raised {test_create_project_repository} + ensure + ActionController::Base.allow_forgery_protection = false + end end -- cgit v1.2.3