Fixing some tests

This commit is contained in:
Marius Orcsik 2019-10-15 22:04:15 +02:00
parent 6b0328f151
commit 794d2e1929
No known key found for this signature in database
GPG key ID: 889CE8E4FB2D877A
2 changed files with 9 additions and 2 deletions

View file

@ -6,7 +6,8 @@
"tag": [
{
"name": "#my_tag",
"id": "http://example.com/tag/my_tag"
"id": "http://example.com/tag/my_tag",
"type": "Mention"
},
{
"name": "@ana",

View file

@ -241,11 +241,12 @@ var allTests = tests{
a.NilLangRef, "A Simple, non-specific object",
}},
Tag: a.ItemCollection{
&a.Object{
&a.Mention{
Name: a.NaturalLanguageValues{{
a.NilLangRef, "#my_tag",
}},
ID: a.ObjectID("http://example.com/tag/my_tag"),
Type: a.MentionType,
},
&a.Mention{
Name: a.NaturalLanguageValues{{
@ -512,3 +513,8 @@ func Test_ActivityPubUnmarshal(t *testing.T) {
})
}
}
func TestMain (m *testing.M) {
a.ItemTyperFunc = ap.JSONGetItemByType
m.Run()
}