1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionpack/test/dispatch
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
..
middleware_stack make sure string keys are always looked up from the class cache 2011-03-02 10:11:28 -08:00
request Multipart is now fixed in Rack. 2011-05-03 12:10:11 +02:00
session Replace references to ActiveSupport::SecureRandom with just SecureRandom, and require 'securerandom' from the stdlib when active support is required. 2011-05-23 20:25:44 +01:00
callbacks_test.rb Don't deprecate to_prepare. 2010-12-23 19:21:14 +01:00
cookies_test.rb Add backward compatibility for testing cookies 2011-06-05 12:34:27 +01:00
header_test.rb
mapper_test.rb Remove 'warning: ambiguous first argument' when running ActionPack tests 2011-03-29 10:23:10 -03:00
middleware_stack_test.rb added block arguments to ActionController::Metal#use 2010-09-12 07:35:54 +08:00
mime_type_test.rb Use Mime::Type references. 2011-02-08 14:14:26 -08:00
mount_test.rb Check if the routes object really responds to define_mount_prefix. 2010-12-09 13:15:25 +01:00
prefix_generation_test.rb Fix tests, main_app mounted helper must be defined explicitly now. 2011-04-25 17:57:52 +02:00
rack_cache_test.rb Dump and load rack-cache stuff. 2011-05-17 17:33:17 -04:00
rack_test.rb
reloader_test.rb Clean up callbacks should also be called on exceptions. 2010-12-23 19:17:02 +01:00
request_test.rb Logs should show overridden method; Issue 426 2011-05-07 03:04:26 -07:00
response_test.rb Do not inherit from Rack::Response, remove a shit-ton of unused code. 2011-04-19 11:54:12 +02:00
routing_assertions_test.rb Fix assert_recognizes with block constraints [#5805 state:resolved] 2011-02-13 23:24:46 +00:00
routing_test.rb Remove #among? from Active Support 2011-04-13 20:25:28 +08:00
show_exceptions_test.rb Don't pluralize, camelize. 2011-05-06 17:00:59 +02:00
static_test.rb Static middleware accepts cache control. 2011-05-03 12:32:14 +02:00
test_request_test.rb Ensure cookie keys are strings 2011-06-05 12:03:31 +01:00
test_response_test.rb Add ActionDispatch::TestResponse tests. 2010-09-25 10:52:57 +02:00
uploaded_file_test.rb delegating path and open to internal tempfile 2010-11-18 10:10:25 -08:00
url_generation_test.rb Extended url_for to handle specifying which router should be used. 2010-09-03 22:59:06 +02:00