From 010f02666db59cccfeced6e117b9488ff6fa5351 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Fri, 21 Sep 2018 09:01:37 +0800 Subject: Add missing test case for `redirect_to` when request includes a port. --- actionpack/test/controller/redirect_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'actionpack/test/controller') 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 -- cgit v1.2.3