Permalink
Browse files

Ensure calling reset session twice does not raise errors.

  • Loading branch information...
1 parent 8796f9a commit d5779efaf2375466ab557868e586b9dbd942abc1 @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
@@ -94,6 +95,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 d5779ef

Please sign in to comment.