From fb1fc7cb3a470ef51e97da55098930412b7019ca Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Wed, 8 May 2024 12:45:38 +0200 Subject: [PATCH] remove test --- crates/apub/src/api/user_settings_backup.rs | 34 +-------------------- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/crates/apub/src/api/user_settings_backup.rs b/crates/apub/src/api/user_settings_backup.rs index dbf74e4ed..3d75fb1e8 100644 --- a/crates/apub/src/api/user_settings_backup.rs +++ b/crates/apub/src/api/user_settings_backup.rs @@ -325,7 +325,7 @@ mod tests { traits::{Crud, Followable}, }; use lemmy_db_views::structs::LocalUserView; - use lemmy_db_views_actor::structs::{CommunityBlockView, CommunityFollowerView}; + use lemmy_db_views_actor::structs::{CommunityFollowerView}; use lemmy_utils::error::{LemmyErrorType, LemmyResult}; use pretty_assertions::assert_eq; use serial_test::serial; @@ -483,36 +483,4 @@ mod tests { LocalUser::delete(&mut context.pool(), import_user.local_user.id).await?; Ok(()) } - - #[tokio::test] - #[serial] - async fn test_settings_fetch_and_import() -> LemmyResult<()> { - let context = LemmyContext::init_test_context().await; - - let backup: UserSettingsBackup = serde_json::from_str( - r#"{"blocked_communities": [ - "https://slrpnk.net/c/memes", - "https://lemmy.world/c/atheism", - "https://midwest.social/c/religiouscringe" - ] - }"#, - ) - .unwrap(); - let import_user = create_user("charles".to_string(), None, &context).await?; - - import_settings( - actix_web::web::Json(backup), - import_user.clone(), - context.reset_request_count(), - ) - .await?; - - // wait for background task to finish - sleep(Duration::from_millis(1000)).await; - - let blocks = CommunityBlockView::for_person(&mut context.pool(), import_user.person.id).await?; - assert_eq!(blocks.len(), 3); - LocalUser::delete(&mut context.pool(), import_user.local_user.id).await?; - Ok(()) - } }