1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Invalid route requirements should always raise an exception even if they are unused

This commit is contained in:
Joshua Peek 2009-10-17 16:36:39 -05:00
parent d0f4d93df8
commit d50413826f

View file

@ -1019,14 +1019,6 @@ class RouteSetTest < ActiveSupport::TestCase
map.connect 'page/:id', :controller => 'pages', :action => 'show', :id => /\d+\z/
end
end
assert_nothing_raised do
set.draw do |map|
map.connect 'page/:id', :controller => 'pages', :action => 'show', :id => /\d+/, :name => /^(david|jamis)/
end
assert_raise ActionController::RoutingError do
set.generate :controller => 'pages', :action => 'show', :id => 10
end
end
end
def test_route_requirements_with_invalid_http_method_is_invalid