Fix user following (#2623)

Co-authored-by: Dessalines <dessalines@users.noreply.github.com>
This commit is contained in:
Nutomic 2022-12-19 15:55:26 +00:00 committed by GitHub
parent c3fbb7702f
commit 9f52d4ae53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -52,6 +52,7 @@ pub enum GroupInboxActivities {
#[serde(untagged)]
#[enum_delegate::implement(ActivityHandler)]
pub enum PersonInboxActivities {
Follow(Follow),
AcceptFollow(AcceptFollow),
UndoFollow(UndoFollow),
CreateOrUpdatePrivateMessage(CreateOrUpdateChatMessage),
@ -135,7 +136,7 @@ mod tests {
PersonInboxActivitiesWithAnnouncable,
SiteInboxActivities,
},
protocol::tests::test_parse_lemmy_item,
protocol::tests::{test_json, test_parse_lemmy_item},
};
#[test]
@ -160,6 +161,8 @@ mod tests {
"assets/lemmy/activities/create_or_update/create_private_message.json",
)
.unwrap();
test_json::<PersonInboxActivitiesWithAnnouncable>("assets/mastodon/activities/follow.json")
.unwrap();
}
#[test]

View File

@ -9,5 +9,5 @@ export LEMMY_DATABASE_URL=postgres://lemmy:password@localhost:5432/lemmy
# 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