diff options
author | Nicholas Seckar <nseckar@gmail.com> | 2005-07-07 19:43:03 +0000 |
---|---|---|
committer | Nicholas Seckar <nseckar@gmail.com> | 2005-07-07 19:43:03 +0000 |
commit | 5727dc2f42874e32f8cac3c176a085de07b24dd9 (patch) | |
tree | c4a887960cde45a13e0b3b912a6925b2dc92766c /actionpack/test/controller | |
parent | e3af27c51b3a7bb9dcbb45bce07c029ba019eba3 (diff) | |
download | rails-5727dc2f42874e32f8cac3c176a085de07b24dd9.tar.gz rails-5727dc2f42874e32f8cac3c176a085de07b24dd9.tar.bz2 rails-5727dc2f42874e32f8cac3c176a085de07b24dd9.zip |
Properly unescape recognized path components. Fixes #1651.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1764 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/routing_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb index 48151ba198..38b995dc6e 100644 --- a/actionpack/test/controller/routing_test.rb +++ b/actionpack/test/controller/routing_test.rb @@ -693,6 +693,17 @@ class RouteSetTests < Test::Unit::TestCase ) end + def test_paths_escaped + rs.draw do |map| + rs.path 'file/*path', :controller => 'content', :action => 'show_file' + rs.connect ':controller/:action/:id' + end + + results = rs.recognize_path %w(file hello+world how+are+you%3F) + assert results, "Recognition should have succeeded" + assert_equal ['hello world', 'how are you?'], results['path'] + end + def test_backwards rs.draw do |map| rs.connect 'page/:id/:action', :controller => 'pages', :action => 'show' |