Make default content-type text/html

This commit is contained in:
Sdogruyol 2016-01-24 17:44:37 +02:00
parent fdf38b23c8
commit 02af920a0f
3 changed files with 19 additions and 3 deletions

View file

@ -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|