提交 d5041382 编写于 作者: J Joshua Peek

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

上级 d0f4d93d
......@@ -1019,14 +1019,6 @@ def test_route_requirements_with_anchor_chars_are_invalid
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册