diff options
author | Jamis Buck <jamis@37signals.com> | 2006-10-09 19:14:11 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2006-10-09 19:14:11 +0000 |
commit | 02dc646d558bf4c3ff433287d6e392dd02da22a9 (patch) | |
tree | ee67dda8e06bdebc53b4033b9d262ce8754701db /actionpack/test | |
parent | 2c3ca4c4e6d62eb00d46bcf767d04917428f27a7 (diff) | |
download | rails-02dc646d558bf4c3ff433287d6e392dd02da22a9.tar.gz rails-02dc646d558bf4c3ff433287d6e392dd02da22a9.tar.bz2 rails-02dc646d558bf4c3ff433287d6e392dd02da22a9.zip |
Fix relative URL root matching problems
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5272 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/request_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/test/controller/request_test.rb b/actionpack/test/controller/request_test.rb index 9f79e7d6df..11da23561b 100644 --- a/actionpack/test/controller/request_test.rb +++ b/actionpack/test/controller/request_test.rb @@ -207,6 +207,16 @@ class RequestTest < Test::Unit::TestCase @request.env['SCRIPT_NAME'] = "/hieraki/dispatch.cgi" assert_equal "/hieraki/", @request.request_uri assert_equal "/", @request.path + + @request.set_REQUEST_URI '/hieraki/dispatch.cgi' + @request.relative_url_root = '/hieraki' + assert_equal "/dispatch.cgi", @request.path + @request.relative_url_root = nil + + @request.set_REQUEST_URI '/hieraki/dispatch.cgi' + @request.relative_url_root = '/foo' + assert_equal "/hieraki/dispatch.cgi", @request.path + @request.relative_url_root = nil # This test ensures that Rails uses REQUEST_URI over PATH_INFO @request.relative_url_root = nil |