From 6628610ed6969cb2f7b60a57b9e924bd24976271 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 11 Nov 2013 21:41:10 +0000 Subject: Merged r12267. git-svn-id: http://svn.redmine.org/redmine/branches/2.4-stable@12271 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/integration/application_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test') diff --git a/test/integration/application_test.rb b/test/integration/application_test.rb index 7f4e3b595..3ad12a3d1 100644 --- a/test/integration/application_test.rb +++ b/test/integration/application_test.rb @@ -67,4 +67,13 @@ class ApplicationTest < ActionController::IntegrationTest get '/login.png' assert_response 404 end + + def test_invalid_token_should_call_custom_handler + ActionController::Base.allow_forgery_protection = true + post '/issues' + assert_response 422 + assert_include "Invalid form authenticity token.", response.body + ensure + ActionController::Base.allow_forgery_protection = false + end end -- cgit v1.2.3