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:
parent
51fe0fcb00
commit
06f8c839a1
1 changed files with 15 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue