MCPcopy
hub / github.com/gotify/server / doRequestAndExpect

Function doRequestAndExpect

router/router_test.go:411–419  ·  view source on GitHub ↗
(t *testing.T, req *http.Request, code int, json string)

Source from the content-addressed store, hash-verified

409}
410
411func doRequestAndExpect(t *testing.T, req *http.Request, code int, json string) {
412 res, err := client.Do(req)
413 assert.Nil(t, err)
414 buf := new(bytes.Buffer)
415 buf.ReadFrom(res.Body)
416
417 assert.Equal(t, code, res.StatusCode)
418 assert.JSONEq(t, json, buf.String())
419}

Callers 2

TestVersionInfoMethod · 0.85
TestAuthenticationMethod · 0.85

Calls 2

DoMethod · 0.80
StringMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…