mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Route declaration must start with / fixes #242
This commit is contained in:
parent
7dd834ad28
commit
e6810c4516
5 changed files with 24 additions and 0 deletions
|
@ -13,5 +13,13 @@ describe "Route" do
|
|||
client_response = call_request_on_app(request)
|
||||
client_response.body.should eq("Route 2")
|
||||
end
|
||||
|
||||
it "doesn't allow a route declaration start without /" do
|
||||
expect_raises Kemal::Exceptions::PathStartInvalidException, "Route declaration get \"route\" needs to start with '/', should be get \"/route\"" do
|
||||
get "route" do |env|
|
||||
"Route 1"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue