From 6216a092ccfe6422f113db906a52fe8ffdafdbe6 Mon Sep 17 00:00:00 2001 From: Matthew Draper Date: Fri, 26 Feb 2016 03:06:38 +1030 Subject: 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 --- .../test/dispatch/session/cache_store_test.rb | 29 ---------------------- 1 file changed, 29 deletions(-) (limited to 'actionpack/test/dispatch/session/cache_store_test.rb') diff --git a/actionpack/test/dispatch/session/cache_store_test.rb b/actionpack/test/dispatch/session/cache_store_test.rb index b911392cf1..dbb996973d 100644 --- a/actionpack/test/dispatch/session/cache_store_test.rb +++ b/actionpack/test/dispatch/session/cache_store_test.rb @@ -12,11 +12,6 @@ class CacheStoreTest < 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 @@ -26,14 +21,6 @@ class CacheStoreTest < 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 @@ -173,22 +160,6 @@ class CacheStoreTest < ActionDispatch::IntegrationTest end 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 - end - private def with_test_route_set with_routing do |set| -- cgit v1.2.3