Tests: Fix scope of store

This commit is contained in:
Lennart
2025-12-31 01:05:56 +01:00
parent f778c470d0
commit 4b8a8c61f2
14 changed files with 103 additions and 316 deletions

View File

@@ -4,6 +4,7 @@ use axum::extract::Request;
use headers::{Authorization, HeaderMapExt};
use http::{HeaderValue, StatusCode};
use rstest::rstest;
use rustical_store_sqlite::tests::{TestStoreContext, test_store_context};
use tower::ServiceExt;
mod calendar;
@@ -11,11 +12,11 @@ mod calendar;
#[rstest]
#[tokio::test]
async fn test_caldav_root(
#[from(get_app)]
#[from(test_store_context)]
#[future]
app: axum::Router,
context: TestStoreContext,
) {
let app = app.await;
let app = get_app(context.await);
let request_template = || {
Request::builder()
@@ -53,11 +54,11 @@ async fn test_caldav_root(
#[rstest]
#[tokio::test]
async fn test_caldav_principal(
#[from(get_app)]
#[from(test_store_context)]
#[future]
app: axum::Router,
context: TestStoreContext,
) {
let app = app.await;
let app = get_app(context.await);
let request_template = || {
Request::builder()