提交 73d8a90b 编写于 作者: P Piotr Sarnacki

Add failing test for #13369

After introducing 50311f13 a regression was introduced: routes with
trailing slash are no longer recognized properly. This commit provides a
failing test for this situation.
上级 2a0ba918
......@@ -2894,6 +2894,24 @@ def test_absolute_controller_namespace
assert_equal '/foo', foo_root_path
end
def test_trailing_slash
draw do
resources :streams
end
get '/streams'
assert @response.ok?, 'route without trailing slash should work'
get '/streams/'
assert @response.ok?, 'route with trailing slash should work'
get '/streams?foobar'
assert @response.ok?, 'route without trailing slash and with QUERY_STRING should work'
get '/streams/?foobar'
assert @response.ok?, 'route with trailing slash and with QUERY_STRING should work'
end
private
def draw(&block)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册