(t *testing.T)
| 7 | ) |
| 8 | |
| 9 | func TestLogErrorWritesToStandardError(t *testing.T) { |
| 10 | var output bytes.Buffer |
| 11 | logger := NewDebugLogger(&output) |
| 12 | |
| 13 | logger.LogError("There was an error") |
| 14 | |
| 15 | if output.String() != "There was an error" { |
| 16 | t.Errorf("Standard error should contain error message, but got: %v", output.String()) |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | func TestLogRequestDisplaysRequestDetails(t *testing.T) { |
| 21 | var output bytes.Buffer |
nothing calls this directly
no test coverage detected