(req *http.Request, expMethod string, expectedPath string, expectedQuery string)
| 34 | } |
| 35 | |
| 36 | func assertRequestWithQuery(req *http.Request, expMethod string, expectedPath string, expectedQuery string) error { |
| 37 | if err := assertRequest(req, expMethod, expectedPath); err != nil { |
| 38 | return err |
| 39 | } |
| 40 | q := req.URL.Query().Encode() |
| 41 | if q != expectedQuery { |
| 42 | return fmt.Errorf("expected query '%s', got '%s'", expectedQuery, q) |
| 43 | } |
| 44 | return nil |
| 45 | } |
| 46 | |
| 47 | // ensureBody makes sure the response has a Body (using [http.NoBody] if |
| 48 | // none is present), and that the request is set on the response, then returns |
no test coverage detected
searching dependent graphs…