mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 19:22:26 +00:00
14 lines
343 B
Rust
14 lines
343 B
Rust
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());
|
|
}
|