(t *testing.T, h http.Handler, method, path string, body io.Reader)
| 2004 | } |
| 2005 | |
| 2006 | func testHandler(t *testing.T, h http.Handler, method, path string, body io.Reader) (*http.Response, string) { |
| 2007 | r, _ := http.NewRequest(method, path, body) |
| 2008 | w := httptest.NewRecorder() |
| 2009 | h.ServeHTTP(w, r) |
| 2010 | return w.Result(), w.Body.String() |
| 2011 | } |
| 2012 | |
| 2013 | type ctxKey struct { |
| 2014 | name string |
no test coverage detected