1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

16 commits

Author SHA1 Message Date
Andrew White
4db0637d55 Allow overriding of all headers from passed environment hash
Allow REMOTE_ADDR, HTTP_HOST and HTTP_USER_AGENT to be overridden from
the environment passed into `ActionDispatch::TestRequest.new`.

Fixes #11590
2013-07-25 07:54:57 +01:00
Carlos Antonio da Silva
7d624e0e8c Integrate Action Pack with Rack 1.5
All ActionPack and Railties tests are passing. Closes #8891.

[Carlos Antonio da Silva + Santiago Pastorino]
2013-01-25 17:28:41 -02:00
Carlos Antonio da Silva
bf112e551b Remove tabs, use spaces ✂️
[ci skip]
2013-01-22 00:35:33 -02:00
Marc-Andre Lafortune
89ebd28d4e Fix bug when Rails.application is defined but is nil. See #881 2012-05-21 15:24:18 -04:00
Bradford Folkens
4755930727 assert nothing raised for setting a cookie value to nil in ActionDispatch 2011-07-14 14:01:39 -05:00
Andrew White
0a9270417c Ensure cookie keys are strings 2011-06-05 12:03:31 +01:00
Andrew White
d4658d86fe Refactor ActionController::TestCase cookies
Assigning cookies for test cases should now use cookies[], e.g:

  cookies[:email] = 'user@example.com'
  get :index
  assert_equal 'user@example.com', cookies[:email]

To clear the cookies, use clear, e.g:

  cookies.clear
  get :index
  assert_nil cookies[:email]

We now no longer write out HTTP_COOKIE and the cookie jar is
persistent between requests so if you need to manipulate the environment
for your test you need to do it before the cookie jar is created.
2011-06-04 07:09:11 +01:00
Andrew White
31f09f9dbc Improve testing of cookies in functional tests:
- cookies can be set using string or symbol keys
- cookies are preserved across calls to get, post, etc.
- cookie names and values are escaped
- cookies can be cleared using @request.cookies.clear

[#6272 state:resolved]
2011-03-06 12:49:44 +00:00
Joshua Peek
f53c36350d Expect Rack 1.1 2009-12-26 13:25:35 -06:00
Jeremy Kemper
1ac8e0662f Rack: HTTPS is either 'on' or 'off' as of 9b7a0569e4067d0c23a00fc24273436e85c56d7f 2009-11-10 16:57:55 -08:00
Yehuda Katz
ef70ad5538 Fix a few more 1.9 bugs. Rack 1.0.1 is required for 1.9 compliance but not release, so bundling 1.0.1 from git 2009-10-15 17:16:42 -07:00
Joshua Peek
a79790e1a5 rack-test 0.4.2 has rack 1.1.pre goodies, we'll use it instead 2009-08-31 23:08:20 -05:00
Jeremy Kemper
9047c9809d Fix implicit ordering expectation 2009-05-02 16:41:50 -07:00
Joshua Peek
a6fff94baf Move TestRequest cookies accessor into AD TestRequest 2009-04-30 19:23:50 -05:00
Joshua Peek
d54604c352 Depend on unreleased rack 1.1 2009-04-30 19:10:05 -05:00
Joshua Peek
00d1a57e9f Start moving TestRequest and TestResponse into ActionDispatch 2009-04-30 17:26:03 -05:00