store: test preparations

This commit is contained in:
Lennart
2025-06-27 13:58:14 +02:00
parent fe78a82806
commit b54fbebe7c
4 changed files with 19 additions and 10 deletions

View File

@@ -0,0 +1,13 @@
use crate::SqliteStore;
use sqlx::SqlitePool;
pub async fn create_test_db() -> Result<SqlitePool, sqlx::Error> {
let db = SqlitePool::connect("sqlite::memory:").await?;
sqlx::migrate!("./migrations").run(&db).await?;
Ok(db)
}
#[tokio::test]
async fn test_create_store() {
SqliteStore::new(create_test_db().await.unwrap());
}