mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Code fixes reported by static code analysis (#450)
This commit is contained in:
parent
f3f7e319ae
commit
c2236acf3a
14 changed files with 60 additions and 65 deletions
|
@ -2,7 +2,7 @@ require "./spec_helper"
|
|||
|
||||
describe "Kemal::ExceptionHandler" do
|
||||
it "renders 404 on route not found" do
|
||||
get "/" do |env|
|
||||
get "/" do
|
||||
"Hello"
|
||||
end
|
||||
|
||||
|
@ -39,7 +39,7 @@ describe "Kemal::ExceptionHandler" do
|
|||
end
|
||||
|
||||
it "renders custom 500 error" do
|
||||
error 500 do |env|
|
||||
error 500 do
|
||||
"Something happened"
|
||||
end
|
||||
get "/" do |env|
|
||||
|
@ -60,7 +60,7 @@ describe "Kemal::ExceptionHandler" do
|
|||
end
|
||||
|
||||
it "keeps the specified error Content-Type" do
|
||||
error 500 do |env|
|
||||
error 500 do
|
||||
"Something happened"
|
||||
end
|
||||
get "/" do |env|
|
||||
|
@ -82,7 +82,7 @@ describe "Kemal::ExceptionHandler" do
|
|||
end
|
||||
|
||||
it "renders custom error with env and error" do
|
||||
error 500 do |env, err|
|
||||
error 500 do |_, err|
|
||||
err.message
|
||||
end
|
||||
get "/" do |env|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue