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
Rafael Mendonça França a05f410029 Write the cookie jar it was not committed in TestCase
For ActionController::Base we write the cookies in a middleware if it
was not yet committed no matter if the response was committed or not. [1]

For ActionController::Live we write the cookies before the response is
committed. [2]

We already mimic ActionController::Live in
ActionController::TestCase but we don't mimic the ActionController::Base
behavior because we were checking if the response was committed before
writing the cookies.

Now we are matching the behavior of the middleware and writing the
cookies if it was not written before.

[1]: 80c6b901d4/actionpack/lib/action_dispatch/middleware/cookies.rb (L599-L604)
[2]: 80c6b901d4/actionpack/lib/action_controller/metal/live.rb (L218-L223)
2015-10-28 02:45:29 -02:00
..
abstract_controller Use Mime[:foo] instead of Mime::Type[:FOO] for back compat 2015-10-06 11:29:30 -07:00
action_controller Write the cookie jar it was not committed in TestCase 2015-10-28 02:45:29 -02:00
action_dispatch Remove dead code 2015-10-28 01:39:23 -02:00
action_pack Start Rails 5 development 🎉 2014-11-28 15:00:06 -02:00
abstract_controller.rb Remove not used requires 2015-09-01 20:36:47 +02:00
action_controller.rb remove RackDelegation module 2015-08-26 11:53:15 -07:00
action_dispatch.rb Soften the lock requirements when eager_load is disabled 2015-07-09 02:23:23 +09:30
action_pack.rb Update copyright notices to 2015 [ci skip] 2014-12-31 08:34:14 +01:00