diff options
Diffstat (limited to 'actionpack/test/dispatch/session/abstract_store_test.rb')
-rw-r--r-- | actionpack/test/dispatch/session/abstract_store_test.rb | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/actionpack/test/dispatch/session/abstract_store_test.rb b/actionpack/test/dispatch/session/abstract_store_test.rb index fe1a7b4f86..47616db15a 100644 --- a/actionpack/test/dispatch/session/abstract_store_test.rb +++ b/actionpack/test/dispatch/session/abstract_store_test.rb @@ -1,5 +1,7 @@ -require 'abstract_unit' -require 'action_dispatch/middleware/session/abstract_store' +# frozen_string_literal: true + +require "abstract_unit" +require "action_dispatch/middleware/session/abstract_store" module ActionDispatch module Session @@ -10,13 +12,13 @@ module ActionDispatch super end - def get_session(env, sid) + def find_session(env, sid) sid ||= 1 session = @sessions[sid] ||= {} [sid, session] end - def set_session(env, sid, session, options) + def write_session(env, sid, session, options) @sessions[sid] = session end end @@ -27,7 +29,7 @@ module ActionDispatch as.call(env) assert @env - assert Request::Session.find @env + assert Request::Session.find ActionDispatch::Request.new @env end def test_new_session_object_is_merged_with_old @@ -36,21 +38,21 @@ module ActionDispatch as.call(env) assert @env - session = Request::Session.find @env - session['foo'] = 'bar' + session = Request::Session.find ActionDispatch::Request.new @env + session["foo"] = "bar" as.call(@env) - session1 = Request::Session.find @env + session1 = Request::Session.find ActionDispatch::Request.new @env assert_not_equal session, session1 assert_equal session.to_hash, session1.to_hash end private - def app(&block) - @env = nil - lambda { |env| @env = env } - end + def app(&block) + @env = nil + lambda { |env| @env = env } + end end end end |