(url string, body string, handler func(http.ResponseWriter, *http.Request), t *testing.T)
| 128 | } |
| 129 | |
| 130 | func testPost(url string, body string, handler func(http.ResponseWriter, *http.Request), t *testing.T) (string, *http.Response) { |
| 131 | t.Helper() |
| 132 | req := httptest.NewRequest(http.MethodPost, url, nil) |
| 133 | req.Body = io.NopCloser(strings.NewReader(body)) |
| 134 | |
| 135 | return testRequest(req, handler, t) |
| 136 | } |
| 137 | |
| 138 | func TestMain(m *testing.M) { |
| 139 | flag.Parse() |
no test coverage detected