(t *testing.T)
| 52 | } |
| 53 | |
| 54 | func TestJSONWriterWriteDisabled(t *testing.T) { |
| 55 | writer := NewJSONWriter(false) |
| 56 | |
| 57 | out, err := captureStdout(t, func() error { |
| 58 | return writer.Write(map[string]string{"status": "ok"}) |
| 59 | }) |
| 60 | if err != nil { |
| 61 | t.Fatalf("expected no error, got %v", err) |
| 62 | } |
| 63 | if out != "" { |
| 64 | t.Fatalf("expected no output, got %q", out) |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | func TestJSONWriterWriteMarshalError(t *testing.T) { |
| 69 | writer := NewJSONWriter(true) |
nothing calls this directly
no test coverage detected