mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
gzip static files options dir listing and etags
format
This commit is contained in:
parent
2ff5991c92
commit
a8cc4f4177
7 changed files with 224 additions and 10 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue