1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

Add filtered and returns empty params test

This commit is contained in:
Shota Iguchi 2018-02-21 00:10:40 +09:00
parent 51fe0fcb00
commit 06f8c839a1

View file

@ -216,6 +216,21 @@ class RoutingTest < Minitest::Test
assert_equal "This is not a drill either", response.body
end
it "returns empty when unmatched with any regex captures" do
mock_app do
before do
# noop
end
get '/hello' do
params.to_s
end
end
assert get('/hello').ok?
assert_body '{}'
end
it "uses 404 error handler for not matching route" do
mock_app {
not_found do