mirror of https://github.com/LemmyNet/lemmy.git
Add test case for Pleroma follow activity (ref #1984)
parent
712dabd16b
commit
bcb0462dae
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"@context": [
|
||||
"https://www.w3.org/ns/activitystreams",
|
||||
"https://mycrowd.ca/schemas/litepub-0.1.jsonld",
|
||||
{
|
||||
"@language": "und"
|
||||
}
|
||||
],
|
||||
"actor": "https://mycrowd.ca/users/kinetix",
|
||||
"cc": [],
|
||||
"id": "https://mycrowd.ca/activities/dab6a4d3-0db0-41ee-8aab-7bfa4929b4fd",
|
||||
"object": "https://lemmy.ca/u/kinetix",
|
||||
"state": "pending",
|
||||
"to": [
|
||||
"https://lemmy.ca/u/kinetix"
|
||||
],
|
||||
"type": "Follow"
|
||||
}
|
|
@ -4,13 +4,17 @@ pub mod undo_follow;
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::protocol::{
|
||||
activities::following::{
|
||||
accept::AcceptFollowCommunity,
|
||||
follow::FollowCommunity,
|
||||
undo_follow::UndoFollowCommunity,
|
||||
use crate::{
|
||||
context::WithContext,
|
||||
objects::tests::file_to_json_object,
|
||||
protocol::{
|
||||
activities::following::{
|
||||
accept::AcceptFollowCommunity,
|
||||
follow::FollowCommunity,
|
||||
undo_follow::UndoFollowCommunity,
|
||||
},
|
||||
tests::test_parse_lemmy_item,
|
||||
},
|
||||
tests::test_parse_lemmy_item,
|
||||
};
|
||||
use serial_test::serial;
|
||||
|
||||
|
@ -22,5 +26,7 @@ mod tests {
|
|||
test_parse_lemmy_item::<UndoFollowCommunity>(
|
||||
"assets/lemmy/activities/following/undo_follow.json",
|
||||
);
|
||||
|
||||
file_to_json_object::<WithContext<FollowCommunity>>("assets/pleroma/activities/follow.json");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue