MakeFormReq makes an HTTP request and returns a response
(endpoint, method, path string, data url.Values)
| 172 | |
| 173 | // MakeFormReq makes an HTTP request and returns a response |
| 174 | func MakeFormReq(endpoint, method, path string, data url.Values) *http.Request { |
| 175 | req := MakeReq(endpoint, method, path, data.Encode()) |
| 176 | req.Header.Set("Content-Type", "application/x-www-form-urlencoded") |
| 177 | |
| 178 | return req |
| 179 | } |
| 180 | |
| 181 | // MustExec fails the test if the given database query has error |
| 182 | func MustExec(t *testing.T, db *gorm.DB, message string) { |