diff options
author | Josh Kalderimis <josh.kalderimis@gmail.com> | 2010-11-24 10:10:38 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-11-24 10:34:18 +0100 |
commit | e39138478b38d7a5e0a13756b1bdfa8b43226846 (patch) | |
tree | 6bfb66786c4a92dbf02004711fc06307a2d93dd4 /actionpack/test/dispatch | |
parent | 0687b21de879d53157e52a2b688e34a1bd1e31f0 (diff) | |
download | rails-e39138478b38d7a5e0a13756b1bdfa8b43226846.tar.gz rails-e39138478b38d7a5e0a13756b1bdfa8b43226846.tar.bz2 rails-e39138478b38d7a5e0a13756b1bdfa8b43226846.zip |
port_string bought back to life as it is part of the public api
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r-- | actionpack/test/dispatch/request_test.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/actionpack/test/dispatch/request_test.rb b/actionpack/test/dispatch/request_test.rb index d140ea8358..8f672c1149 100644 --- a/actionpack/test/dispatch/request_test.rb +++ b/actionpack/test/dispatch/request_test.rb @@ -172,6 +172,14 @@ class RequestTest < ActiveSupport::TestCase assert_equal 8080, request.optional_port end + test "port string" do + request = stub_request 'HTTP_HOST' => 'www.example.org:80' + assert_equal '', request.port_string + + request = stub_request 'HTTP_HOST' => 'www.example.org:8080' + assert_equal ':8080', request.port_string + end + test "full path" do request = stub_request 'SCRIPT_NAME' => '', 'PATH_INFO' => '/path/of/some/uri', 'QUERY_STRING' => 'mapped=1' assert_equal "/path/of/some/uri?mapped=1", request.fullpath @@ -392,7 +400,7 @@ class RequestTest < ActiveSupport::TestCase mock_rack_env = { "QUERY_STRING" => "x[y]=1&x[y][][w]=2", "rack.input" => "foo" } request = nil begin - request = stub_request(mock_rack_env) + request = stub_request(mock_rack_env) request.parameters rescue TypeError => e # rack will raise a TypeError when parsing this query string |