aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/session/test_session_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Updating TestSession to access with indifferenceJeremy Friesen2015-08-261-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following Rails code failed (with a `KeyError` exception) under test: ```ruby class ApplicationController < ActionController::Base def user_strategy # At this point: # ```ruby # session == { # "user_strategy"=>"email", # "user_identifying_value"=>"hello@world.com" # } # ``` if session.key?(:user_strategy) session.fetch(:user_strategy) end end end ``` When I checked the session's keys (`session.keys`), I got an array of strings. If I accessed `session[:user_strategy]` I got the expected `'email'` value. However if I used `session.fetch(:user_strategy)` I got a `KeyError` exception. This appears to be a Rails 4.2.4 regression (as the code works under Rails 4.2.3). Closes #21383
* Adds missing argument handling for ActionController::TestSession toMatthew Gerrior2015-08-061-0/+10
| | | | allow testing controllers that use session#fetch with a default value.
* Add keys/values methods to TestSessionCarlos Antonio da Silva2013-01-251-5/+11
| | | | Bring back the same API we have with Request::Session.
* remove warning: assigned but unused variableSantiago Pastorino2011-06-081-1/+0
|
* Remove deprecated methods since 2-3-stable.José Valim2010-05-181-12/+0
|
* CookieJar#delete should return the key's value, consistent with a HashJeffrey Hardy2009-10-141-2/+2
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Inherit TestSession from Session::AbstractStore and add indifferent access ↵Joshua Peek2009-04-261-16/+8
| | | | to Session::AbstractStore.
* Session tests belong under dispatch folderJoshua Peek2009-04-211-0/+58