style: cargo fmt --all
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
use std::sync::Arc;
|
||||
use application::processing::{ReportBatchProgressHandler, ReportBatchProgressQuery};
|
||||
use application::testing::{InMemoryJobBatchRepository, InMemoryJobRepository};
|
||||
use application::processing::{ReportBatchProgressQuery, ReportBatchProgressHandler};
|
||||
use domain::entities::{Job, JobBatch, JobType};
|
||||
use domain::errors::DomainError;
|
||||
use domain::ports::{JobBatchRepository, JobRepository};
|
||||
use domain::value_objects::{StructuredData, SystemId};
|
||||
use std::sync::Arc;
|
||||
|
||||
#[tokio::test]
|
||||
async fn returns_progress() {
|
||||
@@ -21,7 +21,10 @@ async fn returns_progress() {
|
||||
job_repo.save(&j2).await.unwrap();
|
||||
|
||||
let handler = ReportBatchProgressHandler::new(batch_repo.clone(), job_repo.clone());
|
||||
let progress = handler.execute(ReportBatchProgressQuery { batch_id }).await.unwrap();
|
||||
let progress = handler
|
||||
.execute(ReportBatchProgressQuery { batch_id })
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(progress.batch.batch_id, batch_id);
|
||||
assert_eq!(progress.jobs.len(), 2);
|
||||
@@ -33,9 +36,11 @@ async fn rejects_nonexistent_batch() {
|
||||
let job_repo = Arc::new(InMemoryJobRepository::new());
|
||||
|
||||
let handler = ReportBatchProgressHandler::new(batch_repo.clone(), job_repo.clone());
|
||||
let result = handler.execute(ReportBatchProgressQuery {
|
||||
batch_id: SystemId::new(),
|
||||
}).await;
|
||||
let result = handler
|
||||
.execute(ReportBatchProgressQuery {
|
||||
batch_id: SystemId::new(),
|
||||
})
|
||||
.await;
|
||||
|
||||
assert!(matches!(result, Err(DomainError::NotFound(_))));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user