We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be1e312 commit 0992f5eCopy full SHA for 0992f5e
pkg/networking/middleware/response_test.go
@@ -47,6 +47,8 @@ func Test_ResponseMiddleware(t *testing.T) {
47
assert.Nil(t, err)
48
default:
49
w.WriteHeader(http.StatusOK)
50
+ _, err := w.Write([]byte("hello"))
51
+ assert.Nil(t, err)
52
}
53
})
54
server := httptest.NewServer(handler)
@@ -242,7 +244,7 @@ func Test_ResponseMiddleware(t *testing.T) {
242
244
243
245
bodyBytes, err := io.ReadAll(res.Body)
246
assert.NoError(t, err, "Body should be readable")
- assert.NotNil(t, bodyBytes, "Should be able to read body")
247
+ assert.NotEmpty(t, bodyBytes, "Should be able to read body")
248
249
err = res.Body.Close()
250
assert.NoError(t, err, "Body should close without errors")
0 commit comments