MCPcopy Create free account
hub / github.com/gotify/server / assertJSONResponse

Function assertJSONResponse

error/handler_test.go:76–80  ·  view source on GitHub ↗
(t *testing.T, rec *httptest.ResponseRecorder, code int, json string)

Source from the content-addressed store, hash-verified

74}
75
76func assertJSONResponse(t *testing.T, rec *httptest.ResponseRecorder, code int, json string) {
77 bytes, _ := io.ReadAll(rec.Body)
78 assert.Equal(t, code, rec.Code)
79 assert.JSONEq(t, json, string(bytes))
80}

Callers 4

TestNotFoundFunction · 0.85
TestDefaultErrorInternalFunction · 0.85
TestBindingErrorDefaultFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…