Permalink
Browse files

Ensure calling reset session twice does not raise errors.

  • Loading branch information...
1 parent a7d3223 commit 6b00e8e0f0f2a0f984817ca277142361b43ffc20 @josevalim josevalim committed Nov 20, 2010
Showing with 12 additions and 0 deletions.
  1. +12 −0 actionpack/test/activerecord/active_record_store_test.rb
@@ -23,6 +23,7 @@ def get_session_id
def call_reset_session
session[:foo]
reset_session
+ reset_session if params[:twice]
session[:foo] = "baz"
head :ok
end
@@ -74,6 +75,17 @@ def test_getting_nil_session_value
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'

0 comments on commit 6b00e8e

Please sign in to comment.