test: shared factories and command builders

This commit is contained in:
2026-10-25 22:08:17 +01:00
parent 2ac1d4e0cf
commit 51d92e08a7
58 changed files with 784 additions and 1344 deletions

View File

@@ -1,12 +1,12 @@
use crate::test_support::generate_webhook_token_command;
use std::sync::Arc;
use domain::models::WatchEventSource;
use domain::ports::WebhookTokenRepository;
use domain::testing::InMemoryWebhookTokenRepository;
use uuid::Uuid;
use crate::integrations::deps::GenerateWebhookTokenDeps;
use crate::integrations::{commands::GenerateWebhookTokenCommand, generate_token};
use crate::integrations::generate_token;
#[tokio::test]
async fn generates_token_and_saves() {
@@ -17,11 +17,7 @@ async fn generates_token_and_saves() {
&GenerateWebhookTokenDeps {
webhook_token: Arc::clone(&tokens),
},
GenerateWebhookTokenCommand {
user_id,
provider: WatchEventSource::Jellyfin,
label: None,
},
generate_webhook_token_command(user_id),
)
.await
.unwrap();