(t *testing.T)
| 81 | } |
| 82 | |
| 83 | func TestWriteTextResponse(t *testing.T) { |
| 84 | w := httptest.NewRecorder() |
| 85 | |
| 86 | util.WriteTextResponse(w, "hello world") |
| 87 | |
| 88 | assert.Equal(t, 200, w.Code) |
| 89 | assert.Equal(t, "hello world", w.Body.String()) |
| 90 | assert.Equal(t, "text/plain", w.Header().Get("Content-Type")) |
| 91 | } |
| 92 | |
| 93 | func TestStreamWriteYAMLResponse(t *testing.T) { |
| 94 | type testStruct struct { |
nothing calls this directly
no test coverage detected