Code fixes reported by static code analysis (#450)

This commit is contained in:
V. Elenhaupt 2018-05-17 11:07:40 +03:00 committed by Serdar Dogruyol
parent f3f7e319ae
commit c2236acf3a
14 changed files with 60 additions and 65 deletions

View file

@ -3,10 +3,10 @@ require "./spec_helper"
describe "Route" do
describe "match?" do
it "matches the correct route" do
get "/route1" do |env|
get "/route1" do
"Route 1"
end
get "/route2" do |env|
get "/route2" do
"Route 2"
end
request = HTTP::Request.new("GET", "/route2")
@ -16,7 +16,7 @@ describe "Route" do
it "doesn't allow a route declaration start without /" do
expect_raises Kemal::Exceptions::InvalidPathStartException, "Route declaration get \"route\" needs to start with '/', should be get \"/route\"" do
get "route" do |env|
get "route" do
"Route 1"
end
end