]> Untitled Git - lemmy.git/commitdiff
Add lotide activities to tests
authorColin Reeder <vpzomtrrfrt@gmail.com>
Fri, 3 Dec 2021 04:53:16 +0000 (21:53 -0700)
committerColin Reeder <vpzomtrrfrt@gmail.com>
Fri, 3 Dec 2021 05:44:52 +0000 (22:44 -0700)
crates/apub/assets/lotide/activities/create_note_reply.json [new file with mode: 0644]
crates/apub/assets/lotide/activities/create_page.json [new file with mode: 0644]
crates/apub/src/protocol/activities/create_or_update/mod.rs

diff --git a/crates/apub/assets/lotide/activities/create_note_reply.json b/crates/apub/assets/lotide/activities/create_note_reply.json
new file mode 100644 (file)
index 0000000..b6b2a13
--- /dev/null
@@ -0,0 +1,30 @@
+{
+  "actor": "https://c.tide.tk/users/1",
+  "object": {
+    "@context": "https://www.w3.org/ns/activitystreams",
+    "id": "https://c.tide.tk/comments/52",
+    "type": "Note",
+    "mediaType": "text/html",
+    "source": {
+      "content": "test comment",
+      "mediaType": "text/markdown"
+    },
+    "attributedTo": "https://c.tide.tk/users/1",
+    "content": "<p>test comment</p>\n",
+    "published": "2021-09-16T01:20:27.558063+00:00",
+    "inReplyTo": "https://c.tide.tk/posts/51",
+    "to": "https://c.tide.tk/users/1",
+    "cc": [
+      "https://www.w3.org/ns/activitystreams#Public",
+      "https://c.tide.tk/communities/1"
+    ]
+  },
+  "to": "https://c.tide.tk/users/1",
+  "cc": [
+    "https://www.w3.org/ns/activitystreams#Public",
+    "https://c.tide.tk/communities/1"
+  ],
+  "@context": "https://www.w3.org/ns/activitystreams",
+  "id": "https://c.tide.tk/comments/52/create",
+  "type": "Create"
+}
diff --git a/crates/apub/assets/lotide/activities/create_page.json b/crates/apub/assets/lotide/activities/create_page.json
new file mode 100644 (file)
index 0000000..d39e425
--- /dev/null
@@ -0,0 +1,20 @@
+{
+  "actor": "https://b.tide.tk/apub/users/1",
+  "object": {
+    "@context": "https://www.w3.org/ns/activitystreams",
+    "id": "https://b.tide.tk/apub/posts/60",
+    "type": "Page",
+    "name": "test post from b",
+    "summary": "test post from b",
+    "to": "https://c.tide.tk/communities/1",
+    "cc": "https://www.w3.org/ns/activitystreams#Public",
+    "published": "2020-12-19T19:20:26.941381+00:00",
+    "attributedTo": "https://b.tide.tk/apub/users/1",
+    "url": "https://blog.twitter.com/engineering/en_us/a/2010/announcing-snowflake.html"
+  },
+  "to": "https://c.tide.tk/communities/1",
+  "cc": "https://www.w3.org/ns/activitystreams#Public",
+  "@context": "https://www.w3.org/ns/activitystreams",
+  "id": "https://b.tide.tk/apub/posts/60/create",
+  "type": "Create"
+}
index 6506c283b4fcbd0c16d9bc906f1fef3417350ed3..63ddcf96703301611a7d43a988d218f294743cde 100644 (file)
@@ -26,5 +26,8 @@ mod tests {
     file_to_json_object::<CreateOrUpdateComment>("assets/pleroma/activities/create_note.json");
     file_to_json_object::<CreateOrUpdateComment>("assets/smithereen/activities/create_note.json");
     file_to_json_object::<CreateOrUpdateComment>("assets/mastodon/activities/create_note.json");
+
+    file_to_json_object::<CreateOrUpdatePost>("assets/lotide/activities/create_page.json");
+    file_to_json_object::<CreateOrUpdateComment>("assets/lotide/activities/create_note_reply.json");
   }
 }