simpleSignPost returns a parsed POST request to target carrying v.
(t *testing.T, target string, v url.Values)
| 55 | |
| 56 | // simpleSignPost returns a parsed POST request to target carrying v. |
| 57 | func simpleSignPost(t *testing.T, target string, v url.Values) *http.Request { |
| 58 | t.Helper() |
| 59 | req := httptest.NewRequest(http.MethodPost, target, strings.NewReader(v.Encode())) |
| 60 | req.Header.Set("Content-Type", "application/x-www-form-urlencoded") |
| 61 | assert.NilError(t, req.ParseForm()) |
| 62 | return req |
| 63 | } |
| 64 | |
| 65 | var ( |
| 66 | formInputRe = regexp.MustCompile(`<input type="hidden" name="([^"]+)" value="([^"]*)"`) |
no test coverage detected