diff options
author | Tom Prats <tprats108@gmail.com> | 2016-01-30 19:30:32 -0500 |
---|---|---|
committer | Tom Prats <tprats108@gmail.com> | 2016-01-30 19:30:32 -0500 |
commit | 45a75a3fcc96b22954caf69be2df4e302b134d7a (patch) | |
tree | 1f4ef44ceb84e9aebb264c85c976cae0db661d09 /actionpack/test/dispatch/session/test_session_test.rb | |
parent | 82dc8266dddc199789f3f1e9a9f21975e1c8ee87 (diff) | |
download | rails-45a75a3fcc96b22954caf69be2df4e302b134d7a.tar.gz rails-45a75a3fcc96b22954caf69be2df4e302b134d7a.tar.bz2 rails-45a75a3fcc96b22954caf69be2df4e302b134d7a.zip |
Update Session to utilize indiffernt access
Diffstat (limited to 'actionpack/test/dispatch/session/test_session_test.rb')
-rw-r--r-- | actionpack/test/dispatch/session/test_session_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/session/test_session_test.rb b/actionpack/test/dispatch/session/test_session_test.rb index 3e61d123e3..332c2ae3c8 100644 --- a/actionpack/test/dispatch/session/test_session_test.rb +++ b/actionpack/test/dispatch/session/test_session_test.rb @@ -60,4 +60,11 @@ class ActionController::TestSessionTest < ActiveSupport::TestCase session = ActionController::TestSession.new(one: '1') assert_equal(2, session.fetch('2') { |key| key.to_i }) end + + def test_fetch_returns_indifferent_access + session = ActionController::TestSession.new(three: { two: '1' }) + three = session.fetch(:three) + assert_equal('1', three[:two]) + assert_equal('1', three["two"]) + end end |