refactor(tests): remove unused value_objects imports from test files
Some checks failed
lint / lint (push) Failing after 9m20s
test / unit (push) Successful in 16m13s

This commit is contained in:
2026-05-29 10:18:18 +02:00
parent 79f1e63bb8
commit f9de21dcfa
13 changed files with 8 additions and 24 deletions

View File

@@ -1,4 +1,3 @@
use super::*;
use domain::{
events::DomainEvent,
value_objects::{LikeId, ThoughtId, UserId},

View File

@@ -756,7 +756,7 @@ impl PostgresApUserRepository {
also_known_as: r.also_known_as.into_iter().collect(),
profile_url,
attachment: vec![],
manually_approves_followers: false,
manually_approves_followers: true,
discoverable: true,
actor_type: ApActorType::default(),
featured_url: None,

View File

@@ -5,7 +5,6 @@ use domain::{
user::User,
},
ports::{SearchPort, ThoughtRepository, UserWriter},
value_objects::*,
};
async fn seed_thought(pool: &sqlx::PgPool, username: &str, content: &str) -> (User, Thought) {
@@ -102,9 +101,9 @@ async fn search_thoughts_returns_empty_for_no_match(pool: sqlx::PgPool) {
#[sqlx::test(migrations = "../postgres/migrations")]
async fn search_thoughts_viewer_context(pool: sqlx::PgPool) {
use domain::models::social::Like;
use domain::ports::{LikeRepository, UserWriter};
use domain::ports::LikeRepository;
use domain::value_objects::LikeId;
use postgres::{like::PgLikeRepository, user::PgUserRepository};
use postgres::like::PgLikeRepository;
let (alice, thought) = seed_thought(&pool, "alice", "hello world").await;

View File

@@ -1,7 +1,6 @@
use super::*;
use crate::test_helpers::seed_user;
use chrono::Utc;
use domain::value_objects::*;
#[sqlx::test(migrations = "./migrations")]
async fn block_exists(pool: sqlx::PgPool) {

View File

@@ -1,7 +1,6 @@
use super::*;
use crate::test_helpers::seed_user_and_thought;
use chrono::Utc;
use domain::value_objects::*;
#[sqlx::test(migrations = "./migrations")]
async fn boost_and_count(pool: sqlx::PgPool) {

View File

@@ -7,7 +7,6 @@ use domain::{
user::User,
},
ports::{FeedOptions, FeedQuery, FeedRequest, ThoughtRepository, UserWriter},
value_objects::*,
};
async fn seed(pool: &sqlx::PgPool, username: &str, content: &str) -> (User, Thought) {

View File

@@ -1,7 +1,6 @@
use super::*;
use crate::test_helpers::seed_user;
use chrono::Utc;
use domain::value_objects::*;
#[sqlx::test(migrations = "./migrations")]
async fn save_and_find_follow(pool: sqlx::PgPool) {

View File

@@ -1,7 +1,6 @@
use super::*;
use crate::test_helpers::seed_user_and_thought;
use chrono::Utc;
use domain::value_objects::*;
#[sqlx::test(migrations = "./migrations")]
async fn like_and_count(pool: sqlx::PgPool) {

View File

@@ -1,10 +1,7 @@
use super::*;
use crate::test_helpers;
use chrono::Utc;
use domain::{
models::{notification::NotificationKind, user::User},
value_objects::*,
};
use domain::models::notification::NotificationKind;
#[sqlx::test(migrations = "./migrations")]
async fn save_and_list(pool: sqlx::PgPool) {

View File

@@ -1,9 +1,6 @@
use super::*;
use crate::test_helpers::seed_user;
use domain::{
models::thought::{NewThought, Thought, Visibility},
value_objects::*,
};
use domain::models::thought::{NewThought, Thought, Visibility};
#[sqlx::test(migrations = "./migrations")]
async fn save_and_find_thought(pool: sqlx::PgPool) {

View File

@@ -1,8 +1,5 @@
use super::*;
use domain::{
models::user::{UpdateProfileInput, User},
value_objects::*,
};
use domain::models::user::{UpdateProfileInput, User};
#[sqlx::test(migrations = "./migrations")]
async fn save_and_find_by_id(pool: sqlx::PgPool) {