aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-09-21 10:56:37 +0900
committerGitHub <noreply@github.com>2018-09-21 10:56:37 +0900
commit87a36ca66507cfcc68df817b6dbd69c036fa3dc4 (patch)
tree9a5a34aa0ff27de08abb0b17f99c044f9a830553 /actionpack
parenta6ff4e856dffcd3324390556ceb899aa6594ceda (diff)
parent010f02666db59cccfeced6e117b9488ff6fa5351 (diff)
downloadrails-87a36ca66507cfcc68df817b6dbd69c036fa3dc4.tar.gz
rails-87a36ca66507cfcc68df817b6dbd69c036fa3dc4.tar.bz2
rails-87a36ca66507cfcc68df817b6dbd69c036fa3dc4.zip
Merge pull request #33934 from tgxworld/add_missing_test_case
Add missing test case for `redirect_to` when request includes a port.
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/controller/redirect_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/controller/redirect_test.rb b/actionpack/test/controller/redirect_test.rb
index 461e627154..998498e1b2 100644
--- a/actionpack/test/controller/redirect_test.rb
+++ b/actionpack/test/controller/redirect_test.rb
@@ -214,6 +214,13 @@ class RedirectTest < ActionController::TestCase
assert_equal "http://test.host/things/stuff", redirect_to_url
end
+ def test_relative_url_redirect_host_with_port
+ request.host = "test.host:1234"
+ get :relative_url_redirect_with_status
+ assert_response 302
+ assert_equal "http://test.host:1234/things/stuff", redirect_to_url
+ end
+
def test_simple_redirect_using_options
get :host_redirect
assert_response :redirect