Permalink
Browse files

Merge pull request #19309 from f1sherman/dont-set-session-options-id

Use request.session.id instead of request.session_options[:id]
  • Loading branch information...
guilleiguaran committed Mar 12, 2015
2 parents be49670 + 82402e6 commit ccf8678cec9228a08d01b5a7dc9552821bdc2686
@@ -201,7 +201,7 @@ def initialize(env = {})
super
self.session = TestSession.new
self.session_options = TestSession::DEFAULT_OPTIONS.merge(:id => SecureRandom.hex(16))
self.session_options = TestSession::DEFAULT_OPTIONS
end
def assign_parameters(routes, controller_path, action, parameters = {})
@@ -24,12 +24,4 @@ def test_test_request_has_session_options_initialized
end
end
def test_session_id_exists_by_default
assert_not_nil(@request.session_options[:id])
end
def test_session_id_different_on_each_call
assert_not_equal(@request.session_options[:id], ActionController::TestRequest.new.session_options[:id])
end
end
@@ -22,7 +22,7 @@ def get_session_value
end
def get_session_id
render :text => "#{request.session_options[:id]}"
render :text => "#{request.session.id}"
end
def call_reset_session
@@ -29,7 +29,7 @@ def get_session_value
end
def get_session_id
render :text => "id: #{request.session_options[:id]}"
render :text => "id: #{request.session.id}"
end
def get_class_after_reset_session
@@ -53,7 +53,7 @@ def raise_data_overflow
end
def change_session_id
request.session_options[:id] = nil
request.session.options[:id] = nil
get_session_id
end
@@ -23,7 +23,7 @@ def get_session_value
end
def get_session_id
render :text => "#{request.session_options[:id]}"
render :text => "#{request.session.id}"
end
def call_reset_session

0 comments on commit ccf8678

Please sign in to comment.