2021-10-29 10:32:42 +00:00
|
|
|
pub(crate) mod accept;
|
|
|
|
pub mod follow;
|
|
|
|
pub mod undo_follow;
|
2021-11-01 13:05:20 +00:00
|
|
|
|
|
|
|
#[cfg(test)]
|
|
|
|
mod tests {
|
2022-02-17 22:04:01 +00:00
|
|
|
use crate::protocol::{
|
2022-11-23 23:40:47 +00:00
|
|
|
activities::following::{accept::AcceptFollow, follow::Follow, undo_follow::UndoFollow},
|
2022-02-17 22:04:01 +00:00
|
|
|
tests::test_parse_lemmy_item,
|
2021-11-01 13:05:20 +00:00
|
|
|
};
|
|
|
|
|
2022-02-17 22:04:01 +00:00
|
|
|
#[test]
|
|
|
|
fn test_parse_lemmy_accept_follow() {
|
2022-11-23 23:40:47 +00:00
|
|
|
test_parse_lemmy_item::<Follow>("assets/lemmy/activities/following/follow.json").unwrap();
|
|
|
|
test_parse_lemmy_item::<AcceptFollow>("assets/lemmy/activities/following/accept.json").unwrap();
|
|
|
|
test_parse_lemmy_item::<UndoFollow>("assets/lemmy/activities/following/undo_follow.json")
|
2022-01-20 14:13:29 +00:00
|
|
|
.unwrap();
|
2021-11-01 13:05:20 +00:00
|
|
|
}
|
|
|
|
}
|