aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/routing_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-09-15 22:10:20 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-09-15 22:10:20 +0000
commit148202d401c7114c8ceb69f4f9effaba38461124 (patch)
tree96c82f80fa050467b83785edffe1c8afb3104d43 /actionpack/test/controller/routing_test.rb
parent3f29043f456af423c4ec7599040625c87321aa77 (diff)
downloadrails-148202d401c7114c8ceb69f4f9effaba38461124.tar.gz
rails-148202d401c7114c8ceb69f4f9effaba38461124.tar.bz2
rails-148202d401c7114c8ceb69f4f9effaba38461124.zip
Fixed optimized route segment escaping. Closes #9562.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7487 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller/routing_test.rb')
-rw-r--r--actionpack/test/controller/routing_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb
index fee1ad3ccf..793e1d8cdf 100644
--- a/actionpack/test/controller/routing_test.rb
+++ b/actionpack/test/controller/routing_test.rb
@@ -273,6 +273,14 @@ class LegacyRouteSetTests < Test::Unit::TestCase
assert_equal [], results[:path]
end
+ def test_paths_slashes_unescaped_with_ordered_parameters
+ rs.add_named_route :path, '/file/*path', :controller => 'content'
+
+ # No / to %2F in URI, only for query params.
+ x = setup_for_named_route
+ assert_equal("/file/hello/world", x.send(:path_path, 'hello/world'))
+ end
+
def test_non_controllers_cannot_be_matched
rs.draw do |map|
map.connect ':controller/:action/:id'