diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-01-06 04:18:54 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-06 04:18:54 -0500 |
commit | 5eff7a9ca7bb2ee7f16db1ab4d11cebe28757ba5 (patch) | |
tree | 427d127b00c6316498dabbd5d13f5909d75d7177 /actionpack/lib | |
parent | 5f03172f54a58a57a48a3121562beb2cef866cbe (diff) | |
parent | c5da6414715e3e61f6e51a40245525aa9504a6f3 (diff) | |
download | rails-5eff7a9ca7bb2ee7f16db1ab4d11cebe28757ba5.tar.gz rails-5eff7a9ca7bb2ee7f16db1ab4d11cebe28757ba5.tar.bz2 rails-5eff7a9ca7bb2ee7f16db1ab4d11cebe28757ba5.zip |
Merge pull request #27586 from maclover7/jm-fix-27584
Update `cookies` helper on all HTTP requests
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/test_case.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index 7b620ac95e..57dd605b51 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -389,9 +389,7 @@ 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) - res = process(action, method: "GET", **args) - cookies.update res.cookies - res + process(action, method: "GET", **args) end # Simulate a POST request with the given parameters and set/volley the response. @@ -519,6 +517,7 @@ 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! |