There was an error while loading. Please reload this page.
1 parent c29904d commit a8b5de4Copy full SHA for a8b5de4
response_test.go
@@ -41,3 +41,13 @@ func TestResponse_Write_UsesSetResponseCode(t *testing.T) {
41
res.Write([]byte("test"))
42
assert.Equal(t, http.StatusBadRequest, rec.Code)
43
}
44
+
45
+func TestResponse_Flush(t *testing.T) {
46
+e := New()
47
+rec := httptest.NewRecorder()
48
+res := &Response{echo: e, Writer: rec}
49
50
+res.Write([]byte("test"))
51
+res.Flush()
52
+assert.True(t, rec.Flushed)
53
+}
0 commit comments