test: shared factories and command builders
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
use crate::test_support::create_import_session_command;
|
||||
use std::sync::Arc;
|
||||
|
||||
use uuid::Uuid;
|
||||
|
||||
use domain::testing::InMemoryImportSessionRepository;
|
||||
|
||||
use crate::import::create_session;
|
||||
use crate::import::deps::CreateSessionDeps;
|
||||
use crate::import::{commands::CreateImportSessionCommand, create_session};
|
||||
use crate::test_helpers::TestContextBuilder;
|
||||
|
||||
#[tokio::test]
|
||||
@@ -20,11 +21,7 @@ async fn creates_session_with_parsed_file() {
|
||||
|
||||
let result = create_session::execute(
|
||||
&deps,
|
||||
CreateImportSessionCommand {
|
||||
user_id: Uuid::new_v4(),
|
||||
bytes: b"col1\nval1".to_vec(),
|
||||
format: domain::models::FileFormat::Csv,
|
||||
},
|
||||
create_import_session_command(Uuid::new_v4(), b"col1\nval1"),
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
Reference in New Issue
Block a user