(t *testing.T)
| 42 | } |
| 43 | |
| 44 | func 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 | } |
nothing calls this directly
no test coverage detected