Changes
4 changed files (+54/-56)
-
-
@@ -1,13 +1,11 @@{ "activity":{ "type":"Like", "actor":"https://littr.git/api/accounts/24d4b96f", "object":{ "id":"https://littr.git/api/accounts/ana/liked/7ca154ff", "type":"Article" } "type": "Like", "actor": "https://littr.git/api/accounts/24d4b96f", "object": { "id": "https://littr.git/api/accounts/ana/liked/7ca154ff", "type": "Article" }, "published":"2018-09-06T15:15:09Z", "to":null, "cc":null "published": "2018-09-06T15:15:09Z", "to": null, "cc": null }
-
-
-
@@ -6,12 +6,12 @@"tag": [ { "name": "#my_tag", "ID": "http://example.com/tag/my_tag" "id": "http://example.com/tag/my_tag" }, { "name": "@ana", "type": "Mention", "ID": "http://example.com/users/ana" "id": "http://example.com/users/ana" } ] }
-
-
-
@@ -233,18 +233,20 @@ var allTests = tests{expected: true, blank: &ap.Object{}, result: &ap.Object{ Parent: a.Object{ Parent: a.Parent{ Type: a.ObjectType, ID: a.ObjectID("http://www.test.example/object/1"), Name: a.NaturalLanguageValues{{ a.NilLangRef, "A Simple, non-specific object", }}, Tag: a.ItemCollection{ &a.Object{ Name: a.NaturalLanguageValues{{ a.NilLangRef, "#my_tag", }}, ID: a.ObjectID("http://example.com/tag/my_tag"), &ap.Object{ Parent: a.Parent { Name: a.NaturalLanguageValues{{ a.NilLangRef, "#my_tag", }}, ID: a.ObjectID("http://example.com/tag/my_tag"), }, }, &a.Mention{ Name: a.NaturalLanguageValues{{
-
@@ -281,26 +283,26 @@ var allTests = tests{}, }, }, //"person_with_outbox": testPair{ // expected: true, // blank: &ap.Person{}, // result: &ap.Person{ // Parent: a.Parent{ // ID: a.ObjectID("http://example.com/accounts/ana"), // Type: a.PersonType, // Name: a.NaturalLanguageValues{{a.NilLangRef, "ana"}}, // URL: a.IRI("http://example.com/accounts/ana"), // }, // PreferredUsername: a.NaturalLanguageValues{{a.NilLangRef, "Ana"}}, // Outbox: &a.OrderedCollection{ // Parent: a.Parent{ // ID: a.ObjectID("http://example.com/accounts/ana/outbox"), // Type: a.OrderedCollectionType, // URL: a.IRI("http://example.com/outbox"), // }, // }, // }, //}, "person_with_outbox": testPair{ expected: true, blank: &ap.Person{}, result: &ap.Person{ Parent: a.Parent{ ID: a.ObjectID("http://example.com/accounts/ana"), Type: a.PersonType, Name: a.NaturalLanguageValues{{a.NilLangRef, "ana"}}, URL: a.IRI("http://example.com/accounts/ana"), }, PreferredUsername: a.NaturalLanguageValues{{a.NilLangRef, "Ana"}}, Outbox: &a.OrderedCollection{ Parent: a.Parent{ ID: a.ObjectID("http://example.com/accounts/ana/outbox"), Type: a.OrderedCollectionType, URL: a.IRI("http://example.com/outbox"), }, }, }, }, "ordered_collection": testPair{ expected: true, blank: &a.OrderedCollection{},
-
@@ -387,23 +389,21 @@ var allTests = tests{}, }, }, //"like_activity_with_iri_actor": { // expected: true, // blank: &ap.Like{}, // result: &ap.Like{ // Activity: a.Activity{ // Parent: a.Parent{ // Type: a.LikeType, // Published: time.Date(2018, time.September, 6, 15, 15, 9, 0, zLoc), // }, // actor: a.IRI("https://littr.git/api/accounts/24d4b96f"), // Object: &a.Article{ // ID: a.ObjectID("https://littr.git/api/accounts/ana/liked/7ca154ff"), // Type: a.ArticleType, // }, // }, // }, //}, "like_activity_with_iri_actor": { expected: true, blank: &a.Like{}, result: &a.Like{ Parent: a.Parent{ Type: a.LikeType, Published: time.Date(2018, time.September, 6, 15, 15, 9, 0, zLoc), }, Actor: a.IRI("https://littr.git/api/accounts/24d4b96f"), Object: &a.Article{ ID: a.ObjectID("https://littr.git/api/accounts/ana/liked/7ca154ff"), Type: a.ArticleType, }, }, }, "object_with_audience": testPair{ expected: true, blank: &ap.Object{},
-
-
-
@@ -18,7 +18,7 @@ var organizationPtrType = reflect.TypeOf(new(*Organization)).Elem()var tests = testPairs{ as.ObjectType: objectPtrType, as.ActorType: objectPtrType, as.ActorType: actorPtrType, as.ApplicationType: applicationPtrType, as.ServiceType: servicePtrType, as.PersonType: personPtrType,
-