diff options
author | Jonathan Baudanza <jon@jonb.org> | 2013-09-18 19:01:59 -0700 |
---|---|---|
committer | Jonathan Baudanza <jon@jonb.org> | 2013-09-18 19:01:59 -0700 |
commit | 0f3124dd85b21abd7e1a5705f8574b62a6e46138 (patch) | |
tree | 71dd2eedbb8ea29d673bb6159672121804dbddb9 /actionpack/test | |
parent | 1ea4a892a835ada735ba2943b20bdbfd39120e8c (diff) | |
download | rails-0f3124dd85b21abd7e1a5705f8574b62a6e46138.tar.gz rails-0f3124dd85b21abd7e1a5705f8574b62a6e46138.tar.bz2 rails-0f3124dd85b21abd7e1a5705f8574b62a6e46138.zip |
NullSessionHash#destroy should be a no-op
Previously it was raising a NilException
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/request_forgery_protection_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/test/controller/request_forgery_protection_test.rb b/actionpack/test/controller/request_forgery_protection_test.rb index c272e785c2..727db79241 100644 --- a/actionpack/test/controller/request_forgery_protection_test.rb +++ b/actionpack/test/controller/request_forgery_protection_test.rb @@ -78,6 +78,11 @@ class RequestForgeryProtectionControllerUsingNullSession < ActionController::Bas cookies.encrypted[:foo] = 'bar' render :nothing => true end + + def try_to_reset_session + reset_session + render :nothing => true + end end class FreeCookieController < RequestForgeryProtectionControllerUsingResetSession @@ -320,6 +325,11 @@ class RequestForgeryProtectionControllerUsingNullSessionTest < ActionController: post :encrypted assert_response :ok end + + test 'should allow reset_session' do + post :try_to_reset_session + assert_response :ok + end end class RequestForgeryProtectionControllerUsingExceptionTest < ActionController::TestCase |