mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
28 lines
697 B
Crystal
28 lines
697 B
Crystal
require "./spec_helper"
|
|
|
|
describe "Kemal::CommonExceptionHandler" do
|
|
# it "renders 404 on route not found" do
|
|
# get "/" do |env|
|
|
# "Hello"
|
|
# end
|
|
#
|
|
# request = HTTP::Request.new("GET", "/asd")
|
|
# client_response = call_request_on_app(request)
|
|
# client_response.status_code.should eq 404
|
|
# end
|
|
#
|
|
# it "renders custom error" do
|
|
# error 403 do
|
|
# "403 error"
|
|
# end
|
|
#
|
|
# get "/" do |env|
|
|
# env.response.status_code = 403
|
|
# end
|
|
#
|
|
# request = HTTP::Request.new("GET", "/")
|
|
# client_response = call_request_on_app(request)
|
|
# client_response.status_code.should eq 403
|
|
# client_response.body.should eq "403 error"
|
|
# end
|
|
end
|