| Conditions | 3 |
| Total Lines | 7 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | package helpers |
||
| 20 | func MakeRequestCapturingTestServer(responseCode int, body string, request *http.Request) *httptest.Server { |
||
| 21 | return httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) { |
||
| 22 | *request = *req |
||
| 23 | res.WriteHeader(responseCode) |
||
| 24 | _, err := res.Write([]byte(body)) |
||
| 25 | if err != nil { |
||
| 26 | panic(err) |
||
| 27 | } |
||
| 30 |