mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Make default content-type text/html
This commit is contained in:
parent
fdf38b23c8
commit
02af920a0f
3 changed files with 19 additions and 3 deletions
|
@ -1,6 +1,17 @@
|
|||
require "./spec_helper"
|
||||
|
||||
describe "Context" do
|
||||
it "sets content type" do
|
||||
kemal = Kemal::Handler.new
|
||||
kemal.add_route "GET", "/" do |env|
|
||||
"Hello"
|
||||
end
|
||||
request = HTTP::Request.new("GET", "/")
|
||||
io_with_context = create_request_and_return_io(kemal, request)
|
||||
client_response = HTTP::Client::Response.from_io(io_with_context, decompress: false)
|
||||
client_response.headers["Content-Type"].should eq("text/html")
|
||||
end
|
||||
|
||||
it "sets content type" do
|
||||
kemal = Kemal::Handler.new
|
||||
kemal.add_route "GET", "/" do |env|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue