mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-01-05 14:48:58 +00:00
Assert if json.Unmarshal succeeds
Signed-off-by: Anthony Wang <ta180m@pm.me>
This commit is contained in:
parent
d75809aeee
commit
ebef769703
1 changed files with 1 additions and 0 deletions
|
@ -36,6 +36,7 @@ func TestActivityPubPerson(t *testing.T) {
|
||||||
assert.Contains(t, resp.Body.String(), "@context")
|
assert.Contains(t, resp.Body.String(), "@context")
|
||||||
var m map[string]interface{}
|
var m map[string]interface{}
|
||||||
err := json.Unmarshal(resp.Body.Bytes(), &m)
|
err := json.Unmarshal(resp.Body.Bytes(), &m)
|
||||||
|
assert.Equal(t, err, nil)
|
||||||
|
|
||||||
var person vocab.ActivityStreamsPerson
|
var person vocab.ActivityStreamsPerson
|
||||||
resolver, _ := streams.NewJSONResolver(func(c context.Context, p vocab.ActivityStreamsPerson) error {
|
resolver, _ := streams.NewJSONResolver(func(c context.Context, p vocab.ActivityStreamsPerson) error {
|
||||||
|
|
Loading…
Reference in a new issue