MCPcopy Index your code
hub / github.com/dnote/dnote / MakeFormReq

Function MakeFormReq

pkg/server/testutils/main.go:174–179  ·  view source on GitHub ↗

MakeFormReq makes an HTTP request and returns a response

(endpoint, method, path string, data url.Values)

Source from the content-addressed store, hash-verified

172
173// MakeFormReq makes an HTTP request and returns a response
174func 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
182func MustExec(t *testing.T, db *gorm.DB, message string) {

Callers 10

TestJoinFunction · 0.92
TestJoinErrorFunction · 0.92
TestJoinDuplicateEmailFunction · 0.92
TestJoinDisabledFunction · 0.92
TestLoginFunction · 0.92
TestLogoutFunction · 0.92
TestResetPasswordFunction · 0.92
TestCreateResetTokenFunction · 0.92
TestUpdatePasswordFunction · 0.92
TestUpdateEmailFunction · 0.92

Calls 1

MakeReqFunction · 0.85

Tested by 10

TestJoinFunction · 0.74
TestJoinErrorFunction · 0.74
TestJoinDuplicateEmailFunction · 0.74
TestJoinDisabledFunction · 0.74
TestLoginFunction · 0.74
TestLogoutFunction · 0.74
TestResetPasswordFunction · 0.74
TestCreateResetTokenFunction · 0.74
TestUpdatePasswordFunction · 0.74
TestUpdateEmailFunction · 0.74