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_controller
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
..
caching Merge pull request #14137 from dasch/better-fragment-cache-instrumentation 2014-05-14 20:04:43 -03:00
metal fix rdoc markup [ci skip] 2015-10-25 21:25:16 +09:00
railties
api.rb remove RackDelegation module 2015-08-26 11:53:15 -07:00
base.rb eagerly allocate the renderer object 2015-09-14 15:29:19 -07:00
caching.rb remove RackDelegation module 2015-08-26 11:53:15 -07:00
form_builder.rb remove extra = in form builder example [ci skip] 2015-04-15 23:06:01 +09:00
log_subscriber.rb Freeze string literals when not mutated. 2015-07-19 17:45:10 -05:00
metal.rb Delete needless require 'active_support/deprecation' 2015-10-20 20:02:59 +09:00
railtie.rb Merge pull request #15933 from rafael/master 2014-06-27 18:16:52 -03:00
renderer.rb allocate request objects with the env hash, set routes on the request 2015-09-15 07:38:39 -07:00
template_assertions.rb Remove assigns and assert_template. 2015-05-30 14:13:57 +08:00
test_case.rb Write the cookie jar it was not committed in TestCase 2015-10-28 02:45:29 -02:00