mirror of https://github.com/gofiber/fiber.git
refactor: clean up
parent
e25bd848ef
commit
0146b92ba6
|
@ -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)
|
||||
|
||||
|
|
|
@ -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))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue