gzip static files options dir listing and etags

format
This commit is contained in:
Cris Ward 2016-09-15 21:45:54 +01:00
parent 2ff5991c92
commit a8cc4f4177
7 changed files with 224 additions and 10 deletions

View file

@ -133,4 +133,21 @@ describe "Macros" do
Kemal.config.handlers.last.is_a?(HTTP::DeflateHandler).should eq false
end
end
describe "#serve_static" do
it "should disble static file hosting" do
serve_static false
Kemal.config.serve_static.should eq false
end
it "should disble enable gzip and dir_listing" do
serve_static({"gzip" => true, "dir_listing" => true})
conf = Kemal.config.serve_static
conf.is_a?(Hash).should eq true
if conf.is_a?(Hash)
conf["gzip"].should eq true
conf["dir_listing"].should eq true
end
end
end
end