diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2024-10-30 09:32:33 +0100 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2024-10-30 09:32:33 +0100 |
commit | 3c4d00ea2767477492bdecb137cd63c06a61b3cb (patch) | |
tree | 4791d30154e314a2c6e0cd29721c1b7d3bbbcc1d /src/stream | |
parent | 9b74eed77d950745c6fd5f968b153f331867655d (diff) | |
download | rust-zotapi-3c4d00ea2767477492bdecb137cd63c06a61b3cb.tar.gz rust-zotapi-3c4d00ea2767477492bdecb137cd63c06a61b3cb.tar.bz2 rust-zotapi-3c4d00ea2767477492bdecb137cd63c06a61b3cb.zip |
Update streamitem test case to the new AS2 based format.
Diffstat (limited to 'src/stream')
-rw-r--r-- | src/stream/streamitem.rs | 10 |
1 files 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]); } } |