Changes
1 changed files (+20/-2)
-
-
@@ -1,9 +1,9 @@package tests import ( "testing" "activitypub" "jsonld" "testing" ) func TestAcceptSerialization(t *testing.T) {
-
@@ -11,7 +11,7 @@ func TestAcceptSerialization(t *testing.T) {o.Name = make(activitypub.NaturalLanguageValue, 1) o.Name["en"] = "test" ctx := jsonld.Context{URL:"https://www.w3.org/ns/activitystreams"} ctx := jsonld.Context{URL: "https://www.w3.org/ns/activitystreams"} bytes, err := jsonld.Marshal(o, &ctx) if err != nil {
-
@@ -19,3 +19,21 @@ func TestAcceptSerialization(t *testing.T) {} t.Logf("%s", bytes) } func TestCreateActivityHTTPSerialization(t *testing.T) { id := activitypub.ObjectId("test_object") o := activitypub.AcceptNew(id) o.Name["en"] = "Accept New" baseUri := string(activitypub.ActivityBaseURI) c := jsonld.Context{ URL: baseUri + o.Type, } out, err := jsonld.Marshal(o, &c) //out, err := jsonld.Marshal(o) if err != nil { t.Error(err) } t.Logf("%s", out) }
-