Skip to content

Commit

Permalink
Ensure calling reset session twice does not raise errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim committed Nov 20, 2010
1 parent a7d3223 commit 6b00e8e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions actionpack/test/activerecord/active_record_store_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down

0 comments on commit 6b00e8e

Please sign in to comment.