diff options
author | José Valim <jose.valim@gmail.com> | 2012-05-22 22:49:14 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2012-05-22 22:49:14 -0700 |
commit | cb92efbf0463f3b6dc0456a497556d5b414fb0e8 (patch) | |
tree | a0bb0a1bf3d776eaeaeee69c8e6fb78439ce7a96 /actionpack/test | |
parent | 41cfe17658e91a0b52cc99c849ab8a45cea13f4b (diff) | |
parent | 6ac458d3417cc3dff064ddf0167d3afff6043cf9 (diff) | |
download | rails-cb92efbf0463f3b6dc0456a497556d5b414fb0e8.tar.gz rails-cb92efbf0463f3b6dc0456a497556d5b414fb0e8.tar.bz2 rails-cb92efbf0463f3b6dc0456a497556d5b414fb0e8.zip |
Merge pull request #6453 from parndt/session_keys
Added session.keys and session.values back to ActionDispatch::Request::Session
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/dispatch/request/session_test.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/request/session_test.rb b/actionpack/test/dispatch/request/session_test.rb index 4d24456ba6..80d5a13171 100644 --- a/actionpack/test/dispatch/request/session_test.rb +++ b/actionpack/test/dispatch/request/session_test.rb @@ -36,6 +36,22 @@ module ActionDispatch assert_equal s, Session.find(env) end + def test_keys + env = {} + s = Session.create(store, env, {}) + s['rails'] = 'ftw' + s['adequate'] = 'awesome' + assert_equal %w[rails adequate], s.keys + end + + def test_values + env = {} + s = Session.create(store, env, {}) + s['rails'] = 'ftw' + s['adequate'] = 'awesome' + assert_equal %w[ftw awesome], s.values + end + private def store Class.new { |