Skip to content

Commit

Permalink
update1
Browse files Browse the repository at this point in the history
  • Loading branch information
efectn committed May 24, 2024
1 parent 3bbfb23 commit 98a53db
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions middleware/static/static_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ func Test_Static_Direct(t *testing.T) {
require.NoError(t, err)
require.Contains(t, string(body), "Hello, World!")

resp, err = app.Test(httptest.NewRequest(fiber.MethodPost, "/index.html", nil))
require.NoError(t, err, "app.Test(req)")
require.Equal(t, 405, resp.StatusCode, "Status code")
require.NotEmpty(t, resp.Header.Get(fiber.HeaderContentLength))
require.Equal(t, fiber.MIMETextPlainCharsetUTF8, resp.Header.Get(fiber.HeaderContentType))

resp, err = app.Test(httptest.NewRequest(fiber.MethodGet, "/testdata/testRoutes.json", nil))
require.NoError(t, err, "app.Test(req)")
require.Equal(t, 200, resp.StatusCode, "Status code")
Expand Down

0 comments on commit 98a53db

Please sign in to comment.