diff options
author | Matthew Draper <matthew@trebex.net> | 2016-02-26 03:06:38 +1030 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2016-02-26 03:06:38 +1030 |
commit | 6216a092ccfe6422f113db906a52fe8ffdafdbe6 (patch) | |
tree | 7f6fe35ff8f02185aeb9f2c8184665eb44bda81f /actionpack/test/dispatch/session/mem_cache_store_test.rb | |
parent | 1f8ce32edcce503490aa873dd49788c6fd79c135 (diff) | |
download | rails-6216a092ccfe6422f113db906a52fe8ffdafdbe6.tar.gz rails-6216a092ccfe6422f113db906a52fe8ffdafdbe6.tar.bz2 rails-6216a092ccfe6422f113db906a52fe8ffdafdbe6.zip |
Revert "Update Session to utilize indiffernt access"
This reverts commit 45a75a3fcc96b22954caf69be2df4e302b134d7a.
HWIAs are better than silently deeply-stringified hashes... but that's a
reaction to a shortcoming of one particular session store: we should not
break the basic behaviour of other, more featureful, session stores in
the process.
Fixes #23884
Diffstat (limited to 'actionpack/test/dispatch/session/mem_cache_store_test.rb')
-rw-r--r-- | actionpack/test/dispatch/session/mem_cache_store_test.rb | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/actionpack/test/dispatch/session/mem_cache_store_test.rb b/actionpack/test/dispatch/session/mem_cache_store_test.rb index 2e6b42856f..3fed9bad4f 100644 --- a/actionpack/test/dispatch/session/mem_cache_store_test.rb +++ b/actionpack/test/dispatch/session/mem_cache_store_test.rb @@ -13,11 +13,6 @@ class MemCacheStoreTest < ActionDispatch::IntegrationTest head :ok end - def set_deep_session_value - session[:foo] = { bar: "baz" } - head :ok - end - def set_serialized_session_value session[:foo] = SessionAutoloadTest::Foo.new head :ok @@ -27,14 +22,6 @@ class MemCacheStoreTest < ActionDispatch::IntegrationTest render plain: "foo: #{session[:foo].inspect}" end - def get_deep_session_value_with_symbol - render plain: "foo: { bar: #{session[:foo][:bar].inspect} }" - end - - def get_deep_session_value_with_string - render plain: "foo: { \"bar\" => #{session[:foo]["bar"].inspect} }" - end - def get_session_id render plain: "#{request.session.id}" end @@ -192,24 +179,6 @@ class MemCacheStoreTest < ActionDispatch::IntegrationTest rescue Dalli::RingError => ex skip ex.message, ex.backtrace end - - def test_previous_session_has_indifferent_access - with_test_route_set do - get '/set_deep_session_value' - assert_response :success - assert cookies['_session_id'] - - get '/get_deep_session_value_with_symbol' - assert_response :success - assert_equal 'foo: { bar: "baz" }', response.body - - get '/get_deep_session_value_with_string' - assert_response :success - assert_equal 'foo: { "bar" => "baz" }', response.body - end - rescue Dalli::RingError => ex - skip ex.message, ex.backtrace - end rescue LoadError, RuntimeError, Dalli::DalliError $stderr.puts "Skipping MemCacheStoreTest tests. Start memcached and try again." end |