2023-04-03 16:11:26 +02:00
|
|
|
pub mod model;
|
2023-03-26 14:40:56 +02:00
|
|
|
pub mod rest;
|
2023-04-03 22:03:45 +02:00
|
|
|
|
|
|
|
#[cfg(test)]
|
|
|
|
#[macro_export]
|
|
|
|
macro_rules! testdb {
|
|
|
|
() => {{
|
|
|
|
let pool = SqlitePool::connect(":memory:").await.unwrap();
|
|
|
|
sqlx::query_file!("./migration.sql")
|
|
|
|
.execute(&pool)
|
|
|
|
.await
|
|
|
|
.unwrap();
|
|
|
|
sqlx::query_file!("./seeds.sql")
|
|
|
|
.execute(&pool)
|
|
|
|
.await
|
|
|
|
.unwrap();
|
|
|
|
pool
|
|
|
|
}};
|
|
|
|
}
|