]> Untitled Git - lemmy.git/blob - crates/apub/src/protocol/activities/following/mod.rs
Merge pull request #1874 from LemmyNet/protocol-testing
[lemmy.git] / crates / apub / src / protocol / activities / following / mod.rs
1 pub(crate) mod accept;
2 pub mod follow;
3 pub mod undo_follow;
4
5 #[cfg(test)]
6 mod tests {
7   use crate::protocol::{
8     activities::following::{
9       accept::AcceptFollowCommunity,
10       follow::FollowCommunity,
11       undo_follow::UndoFollowCommunity,
12     },
13     tests::test_parse_lemmy_item,
14   };
15   use serial_test::serial;
16
17   #[actix_rt::test]
18   #[serial]
19   async fn test_parse_lemmy_accept_follow() {
20     test_parse_lemmy_item::<FollowCommunity>("assets/lemmy/activities/following/follow.json");
21     test_parse_lemmy_item::<AcceptFollowCommunity>("assets/lemmy/activities/following/accept.json");
22     test_parse_lemmy_item::<UndoFollowCommunity>(
23       "assets/lemmy/activities/following/undo_follow.json",
24     );
25   }
26 }