MCPcopy
hub / github.com/labstack/echo / TestResponse_FlushPanics

Function TestResponse_FlushPanics

response_test.go:108–117  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

106}
107
108func TestResponse_FlushPanics(t *testing.T) {
109 e := New()
110 rw := new(testResponseWriter)
111 res := NewResponse(rw, e.Logger)
112
113 // we test that we behave as before unwrapping flushers - flushing writer that does not support it causes panic
114 assert.PanicsWithError(t, "echo: response writer *echo.testResponseWriter does not support flushing (http.Flusher interface)", func() {
115 res.Flush()
116 })
117}
118
119func TestResponse_UnwrapResponse(t *testing.T) {
120 orgRes := NewResponse(httptest.NewRecorder(), nil)

Callers

nothing calls this directly

Calls 3

FlushMethod · 0.95
NewFunction · 0.85
NewResponseFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…