]> Untitled Git - lemmy.git/blobdiff - crates/apub/src/protocol/activities/create_or_update/mod.rs
Reorganize federation tests (#2092)
[lemmy.git] / crates / apub / src / protocol / activities / create_or_update / mod.rs
index ff03c5a099e4fd4d7759d959d6b26f05e3ded226..0d233ccfcfafff1902c0ea1b84f96517b9a820cc 100644 (file)
@@ -4,21 +4,17 @@ pub mod private_message;
 
 #[cfg(test)]
 mod tests {
-  use crate::{
-    context::WithContext,
-    objects::tests::file_to_json_object,
-    protocol::{
-      activities::create_or_update::{
-        comment::CreateOrUpdateComment,
-        post::CreateOrUpdatePost,
-        private_message::CreateOrUpdatePrivateMessage,
-      },
-      tests::test_parse_lemmy_item,
+  use crate::protocol::{
+    activities::create_or_update::{
+      comment::CreateOrUpdateComment,
+      post::CreateOrUpdatePost,
+      private_message::CreateOrUpdatePrivateMessage,
     },
+    tests::test_parse_lemmy_item,
   };
 
-  #[actix_rt::test]
-  async fn test_parse_create_or_update() {
+  #[test]
+  fn test_parse_lemmy_create_or_update() {
     test_parse_lemmy_item::<CreateOrUpdatePost>(
       "assets/lemmy/activities/create_or_update/create_page.json",
     )
@@ -35,23 +31,5 @@ mod tests {
       "assets/lemmy/activities/create_or_update/create_private_message.json",
     )
     .unwrap();
-
-    file_to_json_object::<WithContext<CreateOrUpdateComment>>(
-      "assets/pleroma/activities/create_note.json",
-    )
-    .unwrap();
-    file_to_json_object::<WithContext<CreateOrUpdateComment>>(
-      "assets/smithereen/activities/create_note.json",
-    )
-    .unwrap();
-    file_to_json_object::<CreateOrUpdateComment>("assets/mastodon/activities/create_note.json")
-      .unwrap();
-
-    file_to_json_object::<CreateOrUpdatePost>("assets/lotide/activities/create_page.json").unwrap();
-    file_to_json_object::<CreateOrUpdateComment>("assets/lotide/activities/create_note_reply.json")
-      .unwrap();
-
-    file_to_json_object::<CreateOrUpdateComment>("assets/friendica/activities/create_note.json")
-      .unwrap();
   }
 }