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
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
..
http Merge branch 'master' of git://github.com/lifo/docrails 2011-05-25 22:48:47 +02:00
middleware Add backward compatibility for testing cookies 2011-06-05 12:34:27 +01:00
routing fix creating an empty route on 1.8. Closes #1210 2011-06-01 15:51:36 +02:00
testing Add backward compatibility for testing cookies 2011-06-05 12:34:27 +01:00
railtie.rb Allow ignore_accept_header through configuration option. 2011-05-02 23:39:42 +02:00
routing.rb added some fixed fonts 2011-05-09 22:06:04 -03:00