From bdf5672077f095dda577b10185e395f865aac3f6 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 24 Sep 2007 23:12:25 +0000 Subject: Change from InvalidToken to InvalidAuthenticityToken to be more specific git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7623 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../controller/request_forgery_protection_test.rb | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'actionpack/test') diff --git a/actionpack/test/controller/request_forgery_protection_test.rb b/actionpack/test/controller/request_forgery_protection_test.rb index 59df4615c5..98ca44c8cb 100644 --- a/actionpack/test/controller/request_forgery_protection_test.rb +++ b/actionpack/test/controller/request_forgery_protection_test.rb @@ -51,27 +51,27 @@ class RequestForgeryProtectionControllerTest < Test::Unit::TestCase end def test_should_not_allow_post_without_token - assert_raises(ActionController::InvalidToken) { post :index } + assert_raises(ActionController::InvalidAuthenticityToken) { post :index } end def test_should_not_allow_put_without_token - assert_raises(ActionController::InvalidToken) { put :index } + assert_raises(ActionController::InvalidAuthenticityToken) { put :index } end def test_should_not_allow_delete_without_token - assert_raises(ActionController::InvalidToken) { delete :index } + assert_raises(ActionController::InvalidAuthenticityToken) { delete :index } end def test_should_not_allow_xhr_post_without_token - assert_raises(ActionController::InvalidToken) { xhr :post, :index } + assert_raises(ActionController::InvalidAuthenticityToken) { xhr :post, :index } end def test_should_not_allow_xhr_put_without_token - assert_raises(ActionController::InvalidToken) { xhr :put, :index } + assert_raises(ActionController::InvalidAuthenticityToken) { xhr :put, :index } end def test_should_not_allow_xhr_delete_without_token - assert_raises(ActionController::InvalidToken) { xhr :delete, :index } + assert_raises(ActionController::InvalidAuthenticityToken) { xhr :delete, :index } end def test_should_allow_post_with_token @@ -161,27 +161,27 @@ class CsrfCookieMonsterControllerTest < Test::Unit::TestCase end def test_should_not_allow_post_without_token - assert_raises(ActionController::InvalidToken) { post :index } + assert_raises(ActionController::InvalidAuthenticityToken) { post :index } end def test_should_not_allow_put_without_token - assert_raises(ActionController::InvalidToken) { put :index } + assert_raises(ActionController::InvalidAuthenticityToken) { put :index } end def test_should_not_allow_delete_without_token - assert_raises(ActionController::InvalidToken) { delete :index } + assert_raises(ActionController::InvalidAuthenticityToken) { delete :index } end def test_should_not_allow_xhr_post_without_token - assert_raises(ActionController::InvalidToken) { xhr :post, :index } + assert_raises(ActionController::InvalidAuthenticityToken) { xhr :post, :index } end def test_should_not_allow_xhr_put_without_token - assert_raises(ActionController::InvalidToken) { xhr :put, :index } + assert_raises(ActionController::InvalidAuthenticityToken) { xhr :put, :index } end def test_should_not_allow_xhr_delete_without_token - assert_raises(ActionController::InvalidToken) { xhr :delete, :index } + assert_raises(ActionController::InvalidAuthenticityToken) { xhr :delete, :index } end def test_should_allow_post_with_token -- cgit v1.2.3