(t *testing.T)
| 73 | } |
| 74 | |
| 75 | func TestParseJSONResponse_Invalid(t *testing.T) { |
| 76 | resp := newApiResp([]byte(`not json`), map[string]string{"Content-Type": "application/json"}) |
| 77 | _, err := ParseJSONResponse(resp) |
| 78 | if err == nil { |
| 79 | t.Error("expected error for invalid JSON") |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | func TestParseJSONResponse_EmptyBody_WrapsEOF(t *testing.T) { |
| 84 | resp := newApiResp([]byte{}, map[string]string{"Content-Type": "application/json"}) |
nothing calls this directly
no test coverage detected