add unit tests

This commit is contained in:
2023-04-26 16:54:53 +02:00
parent 9236113507
commit 346a9b1d91
8 changed files with 325 additions and 135 deletions

View File

@ -84,3 +84,18 @@ pub enum UserTripError {
EventAlreadyFull,
TripDetailsNotFound,
}
#[cfg(test)]
mod test {
use crate::testdb;
//use super::User;
//use sqlx::SqlitePool;
//#[sqlx::test]
//fn test_find_correct_id() {
// let pool = testdb!();
// let user = User::find_by_id(&pool, 1).await.unwrap();
// assert_eq!(user.id, 1);
//}
}