Assert if json.Unmarshal succeeds

Signed-off-by: Anthony Wang <ta180m@pm.me>
This commit is contained in:
Anthony Wang 2022-03-20 10:51:11 -05:00
parent d75809aeee
commit ebef769703
No known key found for this signature in database
GPG Key ID: BC96B00AEC5F2D76
1 changed files with 1 additions and 0 deletions

View File

@ -36,6 +36,7 @@ func TestActivityPubPerson(t *testing.T) {
assert.Contains(t, resp.Body.String(), "@context")
var m map[string]interface{}
err := json.Unmarshal(resp.Body.Bytes(), &m)
assert.Equal(t, err, nil)
var person vocab.ActivityStreamsPerson
resolver, _ := streams.NewJSONResolver(func(c context.Context, p vocab.ActivityStreamsPerson) error {