diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-11-11 20:59:17 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-11-11 20:59:17 +0000 |
commit | 05690057590a2a8d7fe82a1d5df4412ddf879829 (patch) | |
tree | e0aaa63d4852b1f3ccb0623a2d83d33078c018a2 /test/integration | |
parent | 81d69525879b0e39b91b46dd2a3bd46db5c3609d (diff) | |
download | redmine-05690057590a2a8d7fe82a1d5df4412ddf879829.tar.gz redmine-05690057590a2a8d7fe82a1d5df4412ddf879829.zip |
Code cleanup: unverified request no longer raises a InvalidAuthenticityToken exception.
git-svn-id: http://svn.redmine.org/redmine/trunk@12267 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration')
-rw-r--r-- | test/integration/application_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
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 |