aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/session/test_session_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/dispatch/session/test_session_test.rb')
-rw-r--r--actionpack/test/dispatch/session/test_session_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/session/test_session_test.rb b/actionpack/test/dispatch/session/test_session_test.rb
index 59c030176b..3e61d123e3 100644
--- a/actionpack/test/dispatch/session/test_session_test.rb
+++ b/actionpack/test/dispatch/session/test_session_test.rb
@@ -46,6 +46,16 @@ class ActionController::TestSessionTest < ActiveSupport::TestCase
assert_equal('2', session.fetch(:two, '2'))
end
+ def test_fetch_on_symbol_returns_value
+ session = ActionController::TestSession.new(one: '1')
+ assert_equal('1', session.fetch(:one))
+ end
+
+ def test_fetch_on_string_returns_value
+ session = ActionController::TestSession.new(one: '1')
+ assert_equal('1', session.fetch('one'))
+ end
+
def test_fetch_returns_block_value
session = ActionController::TestSession.new(one: '1')
assert_equal(2, session.fetch('2') { |key| key.to_i })