test: cascading in-memory store
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use crate::test_support::create_goal_command;
|
||||
use std::sync::Arc;
|
||||
|
||||
use domain::testing::{FakeStatsRepository, InMemoryGoalRepository, NoopEventPublisher};
|
||||
use domain::testing::{FakeStatsRepository, InMemoryStore, NoopEventPublisher};
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::goals::deps::GoalCommandDeps;
|
||||
@@ -10,7 +10,7 @@ use crate::test_helpers::TestContextBuilder;
|
||||
|
||||
#[tokio::test]
|
||||
async fn deletes_existing_goal() {
|
||||
let goals = InMemoryGoalRepository::new();
|
||||
let goals = InMemoryStore::new();
|
||||
let stats = FakeStatsRepository::new();
|
||||
let events = NoopEventPublisher::new();
|
||||
let deps = GoalCommandDeps {
|
||||
@@ -23,7 +23,7 @@ async fn deletes_existing_goal() {
|
||||
create::execute(&deps, create_goal_command(2025, 10))
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(goals.count(), 1);
|
||||
assert_eq!(goals.goal_count(), 1);
|
||||
|
||||
delete::execute(
|
||||
&deps,
|
||||
@@ -35,7 +35,7 @@ async fn deletes_existing_goal() {
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
assert_eq!(goals.count(), 0);
|
||||
assert_eq!(goals.goal_count(), 0);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
||||
Reference in New Issue
Block a user