aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch
diff options
context:
space:
mode:
authorCarl Lerche <carllerche@mac.com>2010-03-03 00:31:55 -0800
committerCarl Lerche <carllerche@mac.com>2010-03-03 21:24:00 -0800
commitfb14b8c6fddae818b2688ac1e584534390c37f72 (patch)
tree442f5876fe272c724ba8b066f91cd37d2a64ca2d /actionpack/test/dispatch
parenteb49bd694997954783632eada901553f041c9507 (diff)
downloadrails-fb14b8c6fddae818b2688ac1e584534390c37f72.tar.gz
rails-fb14b8c6fddae818b2688ac1e584534390c37f72.tar.bz2
rails-fb14b8c6fddae818b2688ac1e584534390c37f72.zip
ActionDispatch::Request deprecates #request_uri
* Refactored ActionPatch to use fullpath instead
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r--actionpack/test/dispatch/request_test.rb30
1 files changed, 15 insertions, 15 deletions
diff --git a/actionpack/test/dispatch/request_test.rb b/actionpack/test/dispatch/request_test.rb
index 1dfcdaebfd..84c06ca113 100644
--- a/actionpack/test/dispatch/request_test.rb
+++ b/actionpack/test/dispatch/request_test.rb
@@ -143,34 +143,34 @@ class RequestTest < ActiveSupport::TestCase
assert_equal ":8080", request.port_string
end
- test "request uri" do
+ 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.request_uri
- assert_equal "/path/of/some/uri", request.path
+ assert_equal "/path/of/some/uri?mapped=1", request.fullpath
+ assert_equal "/path/of/some/uri", request.path_info
request = stub_request 'SCRIPT_NAME' => '', 'PATH_INFO' => '/path/of/some/uri'
- assert_equal "/path/of/some/uri", request.request_uri
- assert_equal "/path/of/some/uri", request.path
+ assert_equal "/path/of/some/uri", request.fullpath
+ assert_equal "/path/of/some/uri", request.path_info
request = stub_request 'SCRIPT_NAME' => '', 'PATH_INFO' => '/'
- assert_equal "/", request.request_uri
- assert_equal "/", request.path
+ assert_equal "/", request.fullpath
+ assert_equal "/", request.path_info
request = stub_request 'SCRIPT_NAME' => '', 'PATH_INFO' => '/', 'QUERY_STRING' => 'm=b'
- assert_equal "/?m=b", request.request_uri
- assert_equal "/", request.path
+ assert_equal "/?m=b", request.fullpath
+ assert_equal "/", request.path_info
request = stub_request 'SCRIPT_NAME' => '/hieraki', 'PATH_INFO' => '/'
- assert_equal "/hieraki/", request.request_uri
- assert_equal "/", request.path
+ assert_equal "/hieraki/", request.fullpath
+ assert_equal "/", request.path_info
request = stub_request 'SCRIPT_NAME' => '/collaboration/hieraki', 'PATH_INFO' => '/books/edit/2'
- assert_equal "/collaboration/hieraki/books/edit/2", request.request_uri
- assert_equal "/books/edit/2", request.path
+ assert_equal "/collaboration/hieraki/books/edit/2", request.fullpath
+ assert_equal "/books/edit/2", request.path_info
request = stub_request 'SCRIPT_NAME' => '/path', 'PATH_INFO' => '/of/some/uri', 'QUERY_STRING' => 'mapped=1'
- assert_equal "/path/of/some/uri?mapped=1", request.request_uri
- assert_equal "/of/some/uri", request.path
+ assert_equal "/path/of/some/uri?mapped=1", request.fullpath
+ assert_equal "/of/some/uri", request.path_info
end