diff options
author | José Valim <jose.valim@gmail.com> | 2010-11-20 21:56:08 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-11-20 21:56:08 +0100 |
commit | d5779efaf2375466ab557868e586b9dbd942abc1 (patch) | |
tree | 37371fc204182f7b38a73fafcc02b845ecf4a439 /actionpack | |
parent | 8796f9a31a77bb2ab97ea6c2cf2036fb6e38497e (diff) | |
download | rails-d5779efaf2375466ab557868e586b9dbd942abc1.tar.gz rails-d5779efaf2375466ab557868e586b9dbd942abc1.tar.bz2 rails-d5779efaf2375466ab557868e586b9dbd942abc1.zip |
Ensure calling reset session twice does not raise errors.
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/activerecord/active_record_store_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/actionpack/test/activerecord/active_record_store_test.rb b/actionpack/test/activerecord/active_record_store_test.rb index 7c595d1b89..f0fb113860 100644 --- a/actionpack/test/activerecord/active_record_store_test.rb +++ b/actionpack/test/activerecord/active_record_store_test.rb @@ -23,6 +23,7 @@ class ActiveRecordStoreTest < ActionDispatch::IntegrationTest def call_reset_session session[:foo] reset_session + reset_session if params[:twice] session[:foo] = "baz" head :ok end @@ -94,6 +95,17 @@ class ActiveRecordStoreTest < ActionDispatch::IntegrationTest end end + def test_calling_reset_session_twice_does_not_raise_errors + with_test_route_set do + get '/call_reset_session', :twice => "true" + assert_response :success + + get '/get_session_value' + assert_response :success + assert_equal 'foo: "baz"', response.body + end + end + def test_setting_session_value_after_session_reset with_test_route_set do get '/set_session_value' |