X-Git-Url: http://these/git/?a=blobdiff_plain;f=crates%2Fapub%2Fsrc%2Fprotocol%2Factivities%2Fcreate_or_update%2Fmod.rs;h=a516bf9b406c8a7ad83c34c85055694f34ee29e7;hb=92568956353f21649ed9aff68b42699c9d036f30;hp=160bbfba305406996bdb44d312cb1c06c535c693;hpb=eea33089061d0518e58437508261f38d3f7a50ee;p=lemmy.git diff --git a/crates/apub/src/protocol/activities/create_or_update/mod.rs b/crates/apub/src/protocol/activities/create_or_update/mod.rs index 160bbfba..a516bf9b 100644 --- a/crates/apub/src/protocol/activities/create_or_update/mod.rs +++ b/crates/apub/src/protocol/activities/create_or_update/mod.rs @@ -1,42 +1,38 @@ -pub mod comment; -pub mod post; +pub mod chat_message; +pub mod note; +pub mod page; #[cfg(test)] mod tests { - use crate::{ - context::WithContext, - objects::tests::file_to_json_object, - protocol::{ - activities::create_or_update::{comment::CreateOrUpdateComment, post::CreateOrUpdatePost}, - tests::test_parse_lemmy_item, + #![allow(clippy::unwrap_used)] + #![allow(clippy::indexing_slicing)] + + use crate::protocol::{ + activities::create_or_update::{ + chat_message::CreateOrUpdateChatMessage, + note::CreateOrUpdateNote, + page::CreateOrUpdatePage, }, + tests::test_parse_lemmy_item, }; - #[actix_rt::test] - async fn test_parse_create_or_update() { - test_parse_lemmy_item::( + #[test] + fn test_parse_lemmy_create_or_update() { + test_parse_lemmy_item::( "assets/lemmy/activities/create_or_update/create_page.json", - ); - test_parse_lemmy_item::( + ) + .unwrap(); + test_parse_lemmy_item::( "assets/lemmy/activities/create_or_update/update_page.json", - ); - test_parse_lemmy_item::( + ) + .unwrap(); + test_parse_lemmy_item::( "assets/lemmy/activities/create_or_update/create_note.json", - ); - - file_to_json_object::>( - "assets/pleroma/activities/create_note.json", ) .unwrap(); - file_to_json_object::>( - "assets/smithereen/activities/create_note.json", + test_parse_lemmy_item::( + "assets/lemmy/activities/create_or_update/create_private_message.json", ) .unwrap(); - file_to_json_object::("assets/mastodon/activities/create_note.json") - .unwrap(); - - file_to_json_object::("assets/lotide/activities/create_page.json").unwrap(); - file_to_json_object::("assets/lotide/activities/create_note_reply.json") - .unwrap(); } }