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

Add failing test for #13369

After introducing 50311f1 a regression was introduced: routes with
trailing slash are no longer recognized properly. This commit provides a
failing test for this situation.
This commit is contained in:
Piotr Sarnacki 2014-01-16 10:07:51 +01:00
parent 2a0ba918c4
commit 73d8a90bee

View file

@ -2894,6 +2894,24 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
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)