add test for tera/admin/boat.rs

Fixes #33
This commit is contained in:
2023-07-31 19:38:53 +02:00
parent 47b534f8c3
commit 8b5be3fb41
3 changed files with 239 additions and 14 deletions

View File

@@ -2,12 +2,12 @@ use serde::{Deserialize, Serialize};
use sqlx::{FromRow, SqlitePool};
#[derive(FromRow, Debug, Serialize, Deserialize, Clone)]
pub struct LogType{
pub struct LogType {
pub id: i64,
name: String,
}
impl LogType{
impl LogType {
pub async fn find_by_id(db: &SqlitePool, id: i64) -> Option<Self> {
sqlx::query_as!(
Self,
@@ -45,7 +45,7 @@ mod test {
#[sqlx::test]
fn test_find_true() {
let pool = testdb!();
let _ = testdb!();
}
//TODO: write tests