1
1
mirror of https://github.com/go-gitea/gitea synced 2024-07-06 10:05:50 +00:00

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

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 {