aboutsummaryrefslogtreecommitdiffstats
path: root/Rakefile
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-10-28 02:45:29 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-10-28 02:45:29 -0200
commita05f410029a0f8bff81d4a4aa3285a5b3c9d1816 (patch)
treeeb0fc4445b6537457c9b36a656a74c46794e709c /Rakefile
parent80c6b901d4d87cee610ab0a438ff6e3c6bf118d1 (diff)
downloadrails-a05f410029a0f8bff81d4a4aa3285a5b3c9d1816.tar.gz
rails-a05f410029a0f8bff81d4a4aa3285a5b3c9d1816.tar.bz2
rails-a05f410029a0f8bff81d4a4aa3285a5b3c9d1816.zip
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]: https://github.com/rails/rails/blob/80c6b901d4d87cee610ab0a438ff6e3c6bf118d1/actionpack/lib/action_dispatch/middleware/cookies.rb#L599-L604 [2]: https://github.com/rails/rails/blob/80c6b901d4d87cee610ab0a438ff6e3c6bf118d1/actionpack/lib/action_controller/metal/live.rb#L218-L223
Diffstat (limited to 'Rakefile')
0 files changed, 0 insertions, 0 deletions