1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionpack/lib/action_dispatch/middleware
Andrew White e864ff7259 Add backward compatibility for testing cookies
This commit restores the ability to assign cookies for testing via
@request.env['HTTP_COOKIE'] and @request.cookies, e.g:

    @request.env['HTTP_COOKIE'] = 'user_name=david'
    get :index
    assert_equal 'david', cookies[:user_name]

and

    @request.cookies[:user_name] = 'david'
    get :index
    assert_equal 'david', cookies[:user_name]

Assigning via cookies[] is the preferred method and will take precedence
over the other two methods. This is so that cookies set in controller
actions have precedence and are carried over between calls to get, post, etc.
2011-06-05 12:34:27 +01:00
..
session removed deprecated methods, and related tests, from ActionPack 2011-05-24 23:38:59 +02:00
templates/rescues Don't pluralize, camelize. 2011-05-06 17:00:59 +02:00
best_standards_support.rb Improve best_standards_support to use only IE=Edge in development mode 2010-08-09 11:48:31 -07:00
callbacks.rb removed deprecated methods, and related tests, from ActionPack 2011-05-24 23:38:59 +02:00
closed_error.rb Add ClosedError message to the initializer 2011-04-06 15:45:23 -03:00
cookies.rb Add backward compatibility for testing cookies 2011-06-05 12:34:27 +01:00
flash.rb Use initialize_copy! to proper initialize now on clone. 2011-04-19 22:38:51 +02:00
head.rb Make HEAD method masquerade as GET so requests are routed correctly 2010-01-15 12:38:50 -06:00
params_parser.rb Fix parsing xml input by ActionDispatch::ParamsParser 2010-05-06 20:34:47 -07:00
reloader.rb Use run_callbacks; the generated _run_<name>_callbacks method is not a public interface. 2011-01-31 19:45:53 -02:00
remote_ip.rb Move remote_ip to a middleware: 2010-03-03 21:24:00 -08:00
rescue.rb Beef up AD::Rescue to replace global exception handling lost in ApplicationController 2009-09-15 16:33:15 -05:00
show_exceptions.rb Sets the HTTP charset parameter for rescue response. 2011-05-03 16:30:59 +03:00
stack.rb Merge branch 'master' into nested_has_many_through 2011-03-04 09:30:27 +00:00
static.rb cache strings in the AST for faster comparison than include? 2011-05-03 09:59:21 -07:00