Add test for get_note_author_id
This commit is contained in:
parent
5c0672884a
commit
51cb72d142
1 changed files with 11 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue