diff options
author | Mohammed Al Sahaf <msaa1990@gmail.com> | 2020-09-08 19:45:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-08 10:45:48 -0600 |
commit | d4f249741efa0fe300a197e27370a28d8748628f (patch) | |
tree | 3be9959bdff9e37eef60edf94cdc300d8fa47e64 /caddytest/integration | |
parent | 04f50a975932c29bf344b45b3444572b449b1faf (diff) |
browse: align template to struct field renames from 4940325 (#3706)
Diffstat (limited to 'caddytest/integration')
-rw-r--r-- | caddytest/integration/handler_test.go | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/caddytest/integration/handler_test.go b/caddytest/integration/handler_test.go new file mode 100644 index 0000000..fb986c7 --- /dev/null +++ b/caddytest/integration/handler_test.go @@ -0,0 +1,28 @@ +package integration + +import ( + "net/http" + "testing" + + "github.com/caddyserver/caddy/v2/caddytest" +) + +func TestBrowse(t *testing.T) { + tester := caddytest.NewTester(t) + tester.InitServer(` + { + http_port 9080 + https_port 9443 + } + http://localhost:9080 { + file_server browse + } + `, "caddyfile") + + req, err := http.NewRequest(http.MethodGet, "http://localhost:9080/", nil) + if err != nil { + t.Fail() + return + } + tester.AssertResponseCode(req, 200) +} |