X-Git-Url: http://these/git/?a=blobdiff_plain;f=crates%2Fapub%2Fsrc%2Fprotocol%2Factivities%2Fcommunity%2Fmod.rs;h=99a6d0b9cc1e8252b085c170434f45b8b59d9401;hb=92568956353f21649ed9aff68b42699c9d036f30;hp=a7bc81411aa130db02690c56cd1ab0b39ebc3d22;hpb=0bde2d595e793c0b6eb31b592036f0111321cebd;p=lemmy.git diff --git a/crates/apub/src/protocol/activities/community/mod.rs b/crates/apub/src/protocol/activities/community/mod.rs index a7bc8141..99a6d0b9 100644 --- a/crates/apub/src/protocol/activities/community/mod.rs +++ b/crates/apub/src/protocol/activities/community/mod.rs @@ -1,48 +1,57 @@ -pub mod add_mod; pub mod announce; -pub mod block_user; -pub mod remove_mod; +pub mod collection_add; +pub mod collection_remove; +pub mod lock_page; pub mod report; -pub mod undo_block_user; pub mod update; #[cfg(test)] mod tests { + #![allow(clippy::unwrap_used)] + #![allow(clippy::indexing_slicing)] + use crate::protocol::{ activities::community::{ - add_mod::AddMod, - block_user::BlockUserFromCommunity, - remove_mod::RemoveMod, + announce::AnnounceActivity, + collection_add::CollectionAdd, + collection_remove::CollectionRemove, + lock_page::{LockPage, UndoLockPage}, report::Report, - undo_block_user::UndoBlockUserFromCommunity, update::UpdateCommunity, }, tests::test_parse_lemmy_item, }; - use activitystreams::activity::Announce; - use serial_test::serial; - #[actix_rt::test] - #[serial] - async fn test_parse_lemmy_community() { - test_parse_lemmy_item::( + #[test] + fn test_parse_lemmy_community_activities() { + test_parse_lemmy_item::( "assets/lemmy/activities/community/announce_create_page.json", - ); + ) + .unwrap(); + + test_parse_lemmy_item::("assets/lemmy/activities/community/add_mod.json") + .unwrap(); + test_parse_lemmy_item::("assets/lemmy/activities/community/remove_mod.json") + .unwrap(); - test_parse_lemmy_item::("assets/lemmy/activities/community/add_mod.json"); - test_parse_lemmy_item::("assets/lemmy/activities/community/remove_mod.json"); + test_parse_lemmy_item::( + "assets/lemmy/activities/community/add_featured_post.json", + ) + .unwrap(); + test_parse_lemmy_item::( + "assets/lemmy/activities/community/remove_featured_post.json", + ) + .unwrap(); - test_parse_lemmy_item::( - "assets/lemmy/activities/community/block_user.json", - ); - test_parse_lemmy_item::( - "assets/lemmy/activities/community/undo_block_user.json", - ); + test_parse_lemmy_item::("assets/lemmy/activities/community/lock_page.json").unwrap(); + test_parse_lemmy_item::("assets/lemmy/activities/community/undo_lock_page.json") + .unwrap(); test_parse_lemmy_item::( "assets/lemmy/activities/community/update_community.json", - ); + ) + .unwrap(); - test_parse_lemmy_item::("assets/lemmy/activities/community/report_page.json"); + test_parse_lemmy_item::("assets/lemmy/activities/community/report_page.json").unwrap(); } }