summaryrefslogtreecommitdiffstats
path: root/test/functional
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2022-08-10 01:34:37 +0000
committerGo MAEDA <maeda@farend.jp>2022-08-10 01:34:37 +0000
commitd38f97ce473467e5089f46af3eca4103898be8e5 (patch)
treecf3aef22e35b86ffbd069c1c372c619b193bf790 /test/functional
parent6ef581d2571d3c1a95c52e5a284fe4b46f7c6dde (diff)
downloadredmine-d38f97ce473467e5089f46af3eca4103898be8e5.tar.gz
redmine-d38f97ce473467e5089f46af3eca4103898be8e5.zip
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
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/sys_controller_test.rb7
1 files changed, 7 insertions, 0 deletions
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