From 3c4d00ea2767477492bdecb137cd63c06a61b3cb Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Wed, 30 Oct 2024 09:32:33 +0100 Subject: Update streamitem test case to the new AS2 based format. --- src/stream/streamitem.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/stream/streamitem.rs b/src/stream/streamitem.rs index 51382fc..dd311d7 100644 --- a/src/stream/streamitem.rs +++ b/src/stream/streamitem.rs @@ -106,8 +106,8 @@ mod test { "summary": "The summary of the post", "body": "The body of the post", "app": "", - "verb": "http://activitystrea.ms/schema/1.0/post", - "object_type": "http://activitystrea.ms/schema/1.0/note", + "verb": "Create", + "object_type": "Note", "target_type": "", "permalink": "https://example.com/item/2c102ec3-676b-4d84-b2b4-9141467a254f", "location": "", @@ -144,7 +144,7 @@ mod test { "thread_parent" ], "public_scope": "", - "comment_scope": "authenticated", + "comment_scope": "contacts", "tags": [ { "tag": "a-tag", @@ -173,7 +173,7 @@ mod test { assert_eq!("https://example.com/item/2c102ec3-676b-4d84-b2b4-9141467a254f", item.message_top.to_string()); assert_eq!("https://example.com/item/2c102ec3-676b-4d84-b2b4-9141467a254f", item.message_parent.to_string()); assert_eq!("https://example.com/item/2c102ec3-676b-4d84-b2b4-9141467a254f", item.permalink.to_string()); - assert_eq!(Verb::Post, item.verb); + assert_eq!(Verb::Create, item.verb); assert_eq!("The item title", &item.title); assert_eq!("The summary of the post", &item.summary); assert_eq!("The body of the post", &item.body); @@ -181,6 +181,6 @@ mod test { assert_eq!("2023-12-12 17:00:42", &item.edited.to_string()); assert_eq!("0000-00-00 00:00:00", &item.expires.to_string()); assert_eq!("2023-12-19 09:01:15", &item.commented.to_string()); - assert_eq!(StreamItemFlag::ThreadParent, item.flags.unwrap()[0]); + assert_eq!(StreamItemFlag::ThreadParent, item.flags.as_ref().unwrap()[0]); } } -- cgit v1.2.3