+
+#[cfg(test)]
+mod tests {
+ use crate::{
+ activity_lists::{GroupInboxActivities, PersonInboxActivities, SiteInboxActivities},
+ protocol::tests::test_parse_lemmy_item,
+ };
+
+ #[test]
+ fn test_group_inbox() {
+ test_parse_lemmy_item::<GroupInboxActivities>("assets/lemmy/activities/following/follow.json")
+ .unwrap();
+ test_parse_lemmy_item::<GroupInboxActivities>(
+ "assets/lemmy/activities/create_or_update/create_note.json",
+ )
+ .unwrap();
+ }
+
+ #[test]
+ fn test_person_inbox() {
+ test_parse_lemmy_item::<PersonInboxActivities>("assets/lemmy/activities/following/accept.json")
+ .unwrap();
+ test_parse_lemmy_item::<PersonInboxActivities>(
+ "assets/lemmy/activities/create_or_update/create_note.json",
+ )
+ .unwrap();
+ test_parse_lemmy_item::<PersonInboxActivities>(
+ "assets/lemmy/activities/create_or_update/create_private_message.json",
+ )
+ .unwrap();
+ }
+
+ #[test]
+ fn test_site_inbox() {
+ test_parse_lemmy_item::<SiteInboxActivities>(
+ "assets/lemmy/activities/deletion/delete_user.json",
+ )
+ .unwrap();
+ }
+}