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

@@ -1,17 +1,17 @@
#[cfg(test)]
mod tests {
use crate::{addressbook_store::SqliteAddressbookStore, tests::get_test_addressbook_store};
use crate::tests::{TestStoreContext, test_store_context};
use rstest::rstest;
use rustical_store::{Addressbook, AddressbookStore};
#[rstest]
#[tokio::test]
async fn test_addressbook_store(
#[from(get_test_addressbook_store)]
#[from(test_store_context)]
#[future]
addr_store: SqliteAddressbookStore,
context: TestStoreContext,
) {
let addr_store = addr_store.await;
let addr_store = context.await.addr_store;
let cal = Addressbook {
id: "addr".to_string(),