add tests
This commit is contained in:
@ -294,6 +294,16 @@ ORDER BY departure DESC
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub async fn highest_id(db: &SqlitePool) -> i32 {
|
||||
sqlx::query!("SELECT max(id) as id FROM logbook")
|
||||
.fetch_one(db)
|
||||
.await
|
||||
.unwrap()
|
||||
.id
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
pub async fn home(
|
||||
&self,
|
||||
db: &SqlitePool,
|
||||
|
Reference in New Issue
Block a user