From 5ef76873b7b4fb40bb2682a43742b1874e8deb8e Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Sun, 9 Jan 2022 09:12:09 +0900 Subject: [PATCH] Fix tests --- plume-models/src/likes.rs | 9 ++++++++- plume-models/src/reshares.rs | 11 +++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/plume-models/src/likes.rs b/plume-models/src/likes.rs index 2ef6dec6..9c119177 100644 --- a/plume-models/src/likes.rs +++ b/plume-models/src/likes.rs @@ -220,7 +220,14 @@ mod tests { "actor": "https://plu.me/@/admin/", "cc": ["https://plu.me/@/admin/followers"], "id": "https://plu.me/@/admin/like/https://plu.me/~/BlogName/testing#delete", - "object": "https://plu.me/@/admin/like/https://plu.me/~/BlogName/testing#delete", + "object": { + "actor": "https://plu.me/@/admin/", + "cc": ["https://plu.me/@/admin/followers"], + "id": "https://plu.me/@/admin/like/https://plu.me/~/BlogName/testing", + "object": "https://plu.me/~/BlogName/testing", + "to": ["https://www.w3.org/ns/activitystreams#Public"], + "type": "Like", + }, "to": ["https://www.w3.org/ns/activitystreams#Public"], "type": "Undo", }); diff --git a/plume-models/src/reshares.rs b/plume-models/src/reshares.rs index 2162475b..90ca0cc8 100644 --- a/plume-models/src/reshares.rs +++ b/plume-models/src/reshares.rs @@ -246,9 +246,16 @@ mod test { "actor": "https://plu.me/@/admin/", "cc": ["https://plu.me/@/admin/followers"], "id": "https://plu.me/@/admin/reshare/https://plu.me/~/BlogName/testing#delete", - "object": "https://plu.me/@/admin/reshare/https://plu.me/~/BlogName/testing#delete", + "object": { + "actor": "https://plu.me/@/admin/", + "cc": ["https://plu.me/@/admin/followers"], + "id": "https://plu.me/@/admin/reshare/https://plu.me/~/BlogName/testing", + "object": "https://plu.me/~/BlogName/testing", + "to": ["https://www.w3.org/ns/activitystreams#Public"], + "type": "Announce" + }, "to": ["https://www.w3.org/ns/activitystreams#Public"], - "type": "Announce", + "type": "Undo", }); assert_json_eq!(to_value(act)?, expected);