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:
parent
d0f4d93df8
commit
d50413826f
1 changed files with 0 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue