Skip to content

Commit dee0ddd

Browse files
committed
Merge branch 'syntaqx-directory-index'
2 parents fb0a507 + b8c3abd commit dee0ddd

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

echo_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,14 @@ func TestEchoStatic(t *testing.T) {
7878

7979
// Directory with index.html
8080
e.Static("/", "examples/website/public")
81-
c, _ = request(GET, "/", e)
81+
c, r := request(GET, "/", e)
8282
assert.Equal(t, http.StatusOK, c)
83+
assert.Equal(t, true, strings.HasPrefix(r, "<!doctype html>"))
84+
85+
// Sub-directory with index.html
86+
c, r = request(GET, "/folder", e)
87+
assert.Equal(t, http.StatusOK, c)
88+
assert.Equal(t, "sub directory", r)
8389
}
8490

8591
func TestEchoMiddleware(t *testing.T) {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sub directory

0 commit comments

Comments
 (0)