Add missing test case for `redirect_to` when request includes a port.

This commit is contained in:
Guo Xiang Tan 2018-09-21 09:01:37 +08:00
parent 70b5a7594e
commit 010f02666d
1 changed files with 7 additions and 0 deletions

View File

@ -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