aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/session/test_session_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Use frozen string literal in actionpack/Kir Shatrov2017-07-291-0/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* applies new string literal convention in actionpack/testXavier Noria2016-08-061-22/+22
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Revert "Update Session to utilize indiffernt access"Matthew Draper2016-02-261-7/+0
| | | | | | | | | | | 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
* Update Session to utilize indiffernt accessTom Prats2016-01-301-0/+7
|
* 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