mirror of
https://github.com/github/rails.git
synced 2026-02-16 09:05:14 -05:00
Added URL escaping for routing #664
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@670 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -278,6 +278,18 @@ class RouteTests < Test::Unit::TestCase
|
||||
assert_equal Controllers::Admin::UserController, controller
|
||||
assert_equal %w{action id}, leftovers
|
||||
end
|
||||
|
||||
def test_special_characters
|
||||
route ':id', :controller => 'content', :action => 'fish'
|
||||
verify_recognize'id+with+spaces',
|
||||
:controller => 'content', :action => 'fish', :id => 'id with spaces'
|
||||
verify_generate('id+with+spaces', {},
|
||||
{:controller => 'content', :action => 'fish', :id => 'id with spaces'}, {})
|
||||
verify_recognize 'id%2Fwith%2Fslashes',
|
||||
:controller => 'content', :action => 'fish', :id => 'id/with/slashes'
|
||||
verify_generate('id%2Fwith%2Fslashes', {},
|
||||
{:controller => 'content', :action => 'fish', :id => 'id/with/slashes'}, {})
|
||||
end
|
||||
end
|
||||
|
||||
class RouteSetTests < Test::Unit::TestCase
|
||||
|
||||
Reference in New Issue
Block a user