From 62372201e094fb1222a4b30508e9f3ba44301040 Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Sun, 1 May 2022 06:04:58 +0900 Subject: [PATCH] Fix inbox::tests::create_post() --- plume-models/src/inbox.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/plume-models/src/inbox.rs b/plume-models/src/inbox.rs index 0a9b36a2..0458c3f7 100644 --- a/plume-models/src/inbox.rs +++ b/plume-models/src/inbox.rs @@ -98,8 +98,8 @@ pub(crate) mod tests { license: "WTFPL".to_owned(), creation_date: None, ap_url: format!("https://plu.me/~/{}/testing", blogs[0].actor_id), - subtitle: String::new(), - source: String::new(), + subtitle: "Bye".to_string(), + source: "Hello".to_string(), cover_id: None, }, ) @@ -272,7 +272,7 @@ pub(crate) mod tests { "actor": users[0].ap_url, "object": { "type": "Article", - "id": "https://plu.me/~/Blog/my-article", + "id": "https://plu.me/~/BlogName/testing", "attributedTo": [users[0].ap_url, blogs[0].ap_url], "content": "Hello.", "name": "My Article", @@ -290,11 +290,11 @@ pub(crate) mod tests { match super::inbox(&conn, act).unwrap() { super::InboxResult::Post(p) => { assert!(p.is_author(&conn, users[0].id).unwrap()); - assert_eq!(p.source, "Hello.".to_owned()); + assert_eq!(p.source, "Hello".to_owned()); assert_eq!(p.blog_id, blogs[0].id); - assert_eq!(p.content, SafeString::new("Hello.")); - assert_eq!(p.subtitle, "Bye.".to_owned()); - assert_eq!(p.title, "My Article".to_owned()); + assert_eq!(p.content, SafeString::new("Hello")); + assert_eq!(p.subtitle, "Bye".to_owned()); + assert_eq!(p.title, "Testing".to_owned()); } _ => panic!("Unexpected result"), };