aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/routing_test.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/actionpack/test/controller/routing_test.rb b/actionpack/test/controller/routing_test.rb
index c68b1f70d3..3bc240b44d 100644
--- a/actionpack/test/controller/routing_test.rb
+++ b/actionpack/test/controller/routing_test.rb
@@ -711,6 +711,20 @@ class RouteSetTests < Test::Unit::TestCase
assert_equal [], results['path']
end
+ def test_paths_do_not_accept_defaults
+ assert_raises(ActionController::RoutingError) do
+ rs.draw do |map|
+ rs.path 'file/*path', :controller => 'content', :action => 'show_file', :path => %w(fake default)
+ rs.connect ':controller/:action/:id'
+ end
+ end
+
+ rs.draw do |map|
+ rs.path 'file/*path', :controller => 'content', :action => 'show_file', :path => []
+ rs.connect ':controller/:action/:id'
+ end
+ end
+
def test_backwards
rs.draw do |map|
rs.connect 'page/:id/:action', :controller => 'pages', :action => 'show'