1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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

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