Skip to content

Commit 4cffe1a

Browse files
Use a directory we are sure to exist for tests
1 parent 607743c commit 4cffe1a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

fs_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -754,16 +754,16 @@ func TestServeFileDirectoryRedirect(t *testing.T) {
754754

755755
ctx.Request.Reset()
756756
ctx.Response.Reset()
757-
ServeFile(&ctx, ".git")
757+
ServeFile(&ctx, "fasthttputil")
758758
if ctx.Response.StatusCode() != StatusFound {
759-
t.Fatalf("Unexpected status code %d for directory '/.git' without trailing slash. Expecting %d.", ctx.Response.StatusCode(), StatusFound)
759+
t.Fatalf("Unexpected status code %d for directory '/fasthttputil' without trailing slash. Expecting %d.", ctx.Response.StatusCode(), StatusFound)
760760
}
761761

762762
ctx.Request.Reset()
763763
ctx.Response.Reset()
764-
ServeFile(&ctx, ".git/")
764+
ServeFile(&ctx, "fasthttputil/")
765765
if ctx.Response.StatusCode() != StatusOK {
766-
t.Fatalf("Unexpected status code %d for directory '/.git/' with trailing slash. Expecting %d.", ctx.Response.StatusCode(), StatusOK)
766+
t.Fatalf("Unexpected status code %d for directory '/fasthttputil/' with trailing slash. Expecting %d.", ctx.Response.StatusCode(), StatusOK)
767767
}
768768

769769
ctx.Request.Reset()

0 commit comments

Comments
 (0)