Add test for get_note_author_id

This commit is contained in:
silverpill 2023-01-13 01:13:29 +00:00
parent 5c0672884a
commit 51cb72d142

View file

@ -421,6 +421,17 @@ mod tests {
};
use super::*;
#[test]
fn test_get_note_author_id() {
let object = Object {
object_type: NOTE.to_string(),
attributed_to: Some(json!(["https://example.org/1"])),
..Default::default()
};
let author_id = get_note_author_id(&object).unwrap();
assert_eq!(author_id, "https://example.org/1");
}
#[test]
fn test_get_note_content() {
let object = Object {