mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
11 lines
470 B
Crystal
11 lines
470 B
Crystal
require "./spec_helper"
|
|
|
|
describe "Kemal::CommonExceptionHandler" do
|
|
it "renders 404 on route not found" do
|
|
common_exception_handler = Kemal::CommonExceptionHandler::INSTANCE
|
|
request = HTTP::Request.new("GET", "/?message=world")
|
|
io_with_context = create_request_and_return_io(common_exception_handler, request)
|
|
client_response = HTTP::Client::Response.from_io(io_with_context, decompress: false)
|
|
client_response.status_code.should eq 404
|
|
end
|
|
end
|