From 148202d401c7114c8ceb69f4f9effaba38461124 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sat, 15 Sep 2007 22:10:20 +0000 Subject: Fixed optimized route segment escaping. Closes #9562. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7487 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/controller/routing_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'actionpack/test/controller/routing_test.rb') 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' -- cgit v1.2.3