aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/test_case.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2017-01-11 19:43:32 -0500
committerRafael Mendonça França <rafaelmfranca@gmail.com>2017-01-11 19:43:32 -0500
commit6902ca51824d5bc81e6c187ec7a58f787dfe4728 (patch)
tree0fe0686802e28c16347173e05ca11266b2d7cb68 /actionpack/lib/action_controller/test_case.rb
parent9667813bfa8aed05652818f9b280cc75869f7eea (diff)
downloadrails-6902ca51824d5bc81e6c187ec7a58f787dfe4728.tar.gz
rails-6902ca51824d5bc81e6c187ec7a58f787dfe4728.tar.bz2
rails-6902ca51824d5bc81e6c187ec7a58f787dfe4728.zip
Revert "Merge pull request #27586 from maclover7/jm-fix-27584"
This reverts commit 5eff7a9ca7bb2ee7f16db1ab4d11cebe28757ba5, reversing changes made to 5f03172f54a58a57a48a3121562beb2cef866cbe. Reason: It caused a regression. The test case is on the PR.
Diffstat (limited to 'actionpack/lib/action_controller/test_case.rb')
-rw-r--r--actionpack/lib/action_controller/test_case.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb
index 57dd605b51..7b620ac95e 100644
--- a/actionpack/lib/action_controller/test_case.rb
+++ b/actionpack/lib/action_controller/test_case.rb
@@ -389,7 +389,9 @@ module ActionController
# Note that the request method is not verified. The different methods are
# available to make the tests more expressive.
def get(action, **args)
- process(action, method: "GET", **args)
+ res = process(action, method: "GET", **args)
+ cookies.update res.cookies
+ res
end
# Simulate a POST request with the given parameters and set/volley the response.
@@ -517,7 +519,6 @@ module ActionController
unless @request.cookie_jar.committed?
@request.cookie_jar.write(@response)
cookies.update(@request.cookie_jar.instance_variable_get(:@cookies))
- cookies.update(@response.cookies)
end
end
@response.prepare!