diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-06-27 17:34:28 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-27 17:34:28 -0400 |
commit | ab600b1a9268dd5fb00ecccc97f258bcf1c0119d (patch) | |
tree | 201afde6801e9ae43953e37f10f6d3952d828465 /actionpack/test | |
parent | 7f9986237f45a9e771562470bbba629881d0f4aa (diff) | |
parent | 2508c7de267794781efb6d5f61d293c650d3d6e5 (diff) | |
download | rails-ab600b1a9268dd5fb00ecccc97f258bcf1c0119d.tar.gz rails-ab600b1a9268dd5fb00ecccc97f258bcf1c0119d.tar.bz2 rails-ab600b1a9268dd5fb00ecccc97f258bcf1c0119d.zip |
Merge pull request #29551 from Edouard-chin/integration-test-follow-redirect
Calling `follow_redirect!` does not reset the `html_document`:
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/integration_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb index 72163ccd5e..cb282d4330 100644 --- a/actionpack/test/controller/integration_test.rb +++ b/actionpack/test/controller/integration_test.rb @@ -335,6 +335,18 @@ class IntegrationProcessTest < ActionDispatch::IntegrationTest end end + def test_redirect_reset_html_document + with_test_route_set do + get "/redirect" + previous_html_document = html_document + + follow_redirect! + + assert_response :ok + refute_same previous_html_document, html_document + end + end + def test_xml_http_request_get with_test_route_set do get "/get", xhr: true |