refactor: clean up

pull/995/head
Jay Chung 2020-11-04 23:16:42 +08:00
parent e25bd848ef
commit 0146b92ba6
2 changed files with 3 additions and 2 deletions

View File

@ -80,6 +80,7 @@ func Test_Middleware_BasicAuth(t *testing.T) {
req := httptest.NewRequest("GET", "/testauth", nil)
req.Header.Add("Authorization", "Basic "+creds)
resp, err := app.Test(req)
utils.AssertEqual(t, nil, err)
body, err := ioutil.ReadAll(resp.Body)

View File

@ -29,10 +29,10 @@ func Test_Cache_CacheControl(t *testing.T) {
return c.SendString("Hello, World!")
})
resp, err := app.Test(httptest.NewRequest("GET", "/", nil))
_, err := app.Test(httptest.NewRequest("GET", "/", nil))
utils.AssertEqual(t, nil, err)
resp, err = app.Test(httptest.NewRequest("GET", "/", nil))
resp, err := app.Test(httptest.NewRequest("GET", "/", nil))
utils.AssertEqual(t, nil, err)
utils.AssertEqual(t, "public, max-age=10", resp.Header.Get(fiber.HeaderCacheControl))
}