diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-02-27 17:12:35 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-02-27 17:12:35 +0000 |
commit | 630638b00e01d4046d439867a37c15cd037f6c00 (patch) | |
tree | b3b9b42471c3d4d1e7cd956b6fcd3a5d1caf4cfd /actionpack/test | |
parent | 8cddbf0d37c557688bf833e5437a88d98cfaf046 (diff) | |
download | rails-630638b00e01d4046d439867a37c15cd037f6c00.tar.gz rails-630638b00e01d4046d439867a37c15cd037f6c00.tar.bz2 rails-630638b00e01d4046d439867a37c15cd037f6c00.zip |
Fixed that Routes would raise NameErrors if a controller component contains characters that are not valid constant names #733 [Nicholas Seckar]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@803 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/routing_tests.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/actionpack/test/controller/routing_tests.rb b/actionpack/test/controller/routing_tests.rb index f1a3254a42..360ca06cf8 100644 --- a/actionpack/test/controller/routing_tests.rb +++ b/actionpack/test/controller/routing_tests.rb @@ -479,6 +479,17 @@ class RouteSetTests < Test::Unit::TestCase @request.path_parameters = {:controller => 'admin/users', :action => 'index'} verify_generate 'admin/users', {} end + + def test_url_with_spaces_in_controller + @request.path = 'not%20a%20valid/controller/name' + @set.add_route(@rails_route) if @set.empty? + assert_raises(ActionController::RoutingError) {@set.recognize!(@request)} + end + def test_url_with_dots_in_controller + @request.path = 'not.valid/controller/name' + @set.add_route(@rails_route) if @set.empty? + assert_raises(ActionController::RoutingError) {@set.recognize!(@request)} + end end #require '../assertions/action_pack_assertions.rb' |