MCPcopy Create free account
hub / github.com/convox/rack / Request

Method Request

pkg/test/handler_func.go:32–46  ·  view source on GitHub ↗

Request executes an HTTP request against the tester

(method, url string, values url.Values)

Source from the content-addressed store, hash-verified

30
31// Request executes an HTTP request against the tester
32func (f *HandlerFuncTest) Request(method, url string, values url.Values) error {
33 w := httptest.NewRecorder()
34
35 req, err := f.request(method, url, values)
36 if err != nil {
37 return err
38 }
39
40 f.Handler(w, req)
41
42 f.body = w.Body.Bytes()
43 f.code = w.Code
44
45 return nil
46}
47
48// AssertCode asserts the response code
49func (f *HandlerFuncTest) AssertCode(t *testing.T, code int) {

Callers 15

authenticateMethod · 0.80
AuthorizeMethod · 0.80
AppCreateMethod · 0.80
AppLogsMethod · 0.80
AppMetricsMethod · 0.80
AppUpdateMethod · 0.80
BuildCreateMethod · 0.80
BuildListMethod · 0.80
BuildLogsMethod · 0.80
BuildUpdateMethod · 0.80
CertificateCreateMethod · 0.80
EventSendMethod · 0.80

Calls 1

requestMethod · 0.95

Tested by 6

TestBuildCreateUploadFunction · 0.64
TestBuildImportMultipartFunction · 0.64
TestBuildImportUrlFunction · 0.64
TestEnvironmentSetFunction · 0.64
TestBuildImportFunction · 0.64
TestFilesUploadFunction · 0.64