add tests; add authentication cookie
This commit is contained in:
17
src/lib.rs
17
src/lib.rs
@ -1,2 +1,19 @@
|
||||
pub mod model;
|
||||
pub mod rest;
|
||||
|
||||
#[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
|
||||
}};
|
||||
}
|
||||
|
Reference in New Issue
Block a user