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

Function JSONEquals

test/asserts.go:22–28  ·  view source on GitHub ↗

JSONEquals asserts the content of the string with the encoded json of the provided instance.

(t assert.TestingT, obj interface{}, expected string)

Source from the content-addressed store, hash-verified

20
21// JSONEquals asserts the content of the string with the encoded json of the provided instance.
22func JSONEquals(t assert.TestingT, obj interface{}, expected string) {
23 bytes, err := json.Marshal(obj)
24 assert.Nil(t, err)
25 objJSON := string(bytes)
26
27 assert.JSONEq(t, expected, objJSON)
28}
29
30type unreadableReader struct{}
31

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…