MCPcopy Create free account
hub / github.com/0x4D31/finch / TestEchoHandler_JSONEncodeError

Function TestEchoHandler_JSONEncodeError

internal/proxy/echo_error_test.go:44–52  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

42}
43
44func TestEchoHandler_JSONEncodeError(t *testing.T) {
45 r := newRequest(t, "/fp/detail")
46 rr := httptest.NewRecorder()
47 fw := &failWriter{ResponseRecorder: rr, fail: true}
48 echoHandler(fw, r)
49 if rr.Code != http.StatusInternalServerError {
50 t.Fatalf("expected 500, got %d", rr.Code)
51 }
52}

Callers

nothing calls this directly

Calls 2

newRequestFunction · 0.85
echoHandlerFunction · 0.85

Tested by

no test coverage detected