#[serde(untagged)]
#[enum_delegate::implement(ActivityHandler)]
pub enum PersonInboxActivities {
+ Follow(Follow),
AcceptFollow(AcceptFollow),
UndoFollow(UndoFollow),
CreateOrUpdatePrivateMessage(CreateOrUpdateChatMessage),
PersonInboxActivitiesWithAnnouncable,
SiteInboxActivities,
},
- protocol::tests::test_parse_lemmy_item,
+ protocol::tests::{test_json, test_parse_lemmy_item},
};
#[test]
"assets/lemmy/activities/create_or_update/create_private_message.json",
)
.unwrap();
+ test_json::<PersonInboxActivitiesWithAnnouncable>("assets/mastodon/activities/follow.json")
+ .unwrap();
}
#[test]
# so to load the config we need to traverse to the repo root
export LEMMY_CONFIG_LOCATION=../../config/config.hjson
RUST_BACKTRACE=1 \
- cargo test --workspace --all-features --no-fail-fast
+ cargo test -p lemmy_apub --all-features --no-fail-fast
# Add this to do printlns: -- --nocapture