Fix inbox::tests::create_post()
This commit is contained in:
		
							parent
							
								
									036913a828
								
							
						
					
					
						commit
						62372201e0
					
				| @ -98,8 +98,8 @@ pub(crate) mod tests { | |||||||
|                 license: "WTFPL".to_owned(), |                 license: "WTFPL".to_owned(), | ||||||
|                 creation_date: None, |                 creation_date: None, | ||||||
|                 ap_url: format!("https://plu.me/~/{}/testing", blogs[0].actor_id), |                 ap_url: format!("https://plu.me/~/{}/testing", blogs[0].actor_id), | ||||||
|                 subtitle: String::new(), |                 subtitle: "Bye".to_string(), | ||||||
|                 source: String::new(), |                 source: "Hello".to_string(), | ||||||
|                 cover_id: None, |                 cover_id: None, | ||||||
|             }, |             }, | ||||||
|         ) |         ) | ||||||
| @ -272,7 +272,7 @@ pub(crate) mod tests { | |||||||
|                 "actor": users[0].ap_url, |                 "actor": users[0].ap_url, | ||||||
|                 "object": { |                 "object": { | ||||||
|                     "type": "Article", |                     "type": "Article", | ||||||
|                     "id": "https://plu.me/~/Blog/my-article", |                     "id": "https://plu.me/~/BlogName/testing", | ||||||
|                     "attributedTo": [users[0].ap_url, blogs[0].ap_url], |                     "attributedTo": [users[0].ap_url, blogs[0].ap_url], | ||||||
|                     "content": "Hello.", |                     "content": "Hello.", | ||||||
|                     "name": "My Article", |                     "name": "My Article", | ||||||
| @ -290,11 +290,11 @@ pub(crate) mod tests { | |||||||
|             match super::inbox(&conn, act).unwrap() { |             match super::inbox(&conn, act).unwrap() { | ||||||
|                 super::InboxResult::Post(p) => { |                 super::InboxResult::Post(p) => { | ||||||
|                     assert!(p.is_author(&conn, users[0].id).unwrap()); |                     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.blog_id, blogs[0].id); | ||||||
|                     assert_eq!(p.content, SafeString::new("Hello.")); |                     assert_eq!(p.content, SafeString::new("Hello")); | ||||||
|                     assert_eq!(p.subtitle, "Bye.".to_owned()); |                     assert_eq!(p.subtitle, "Bye".to_owned()); | ||||||
|                     assert_eq!(p.title, "My Article".to_owned()); |                     assert_eq!(p.title, "Testing".to_owned()); | ||||||
|                 } |                 } | ||||||
|                 _ => panic!("Unexpected result"), |                 _ => panic!("Unexpected result"), | ||||||
|             }; |             }; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user