aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorGuo Xiang Tan <tgx_world@hotmail.com>2018-09-21 09:01:37 +0800
committerGuo Xiang Tan <tgx_world@hotmail.com>2018-09-21 09:01:37 +0800
commit010f02666db59cccfeced6e117b9488ff6fa5351 (patch)
tree816f2e1fe617b9a620369dd04ef573d205048d40 /actionpack
parent70b5a7594e91d7e3f3ee60642102b7a2323c2e0c (diff)
downloadrails-010f02666db59cccfeced6e117b9488ff6fa5351.tar.gz
rails-010f02666db59cccfeced6e117b9488ff6fa5351.tar.bz2
rails-010f02666db59cccfeced6e117b9488ff6fa5351.zip
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