Skip to content

Commit

Permalink
Add unit tests for ChampionshipCache and UserCache
Browse files Browse the repository at this point in the history
  • Loading branch information
GPeaky committed Nov 16, 2023
1 parent 907159f commit 0dae7a0
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/cache/championship.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,28 @@ impl EntityCache for ChampionshipCache {
Ok(())
}
}

#[cfg(test)]
mod tests {
use crate::error::AppResult;

#[tokio::test]
async fn test_get() -> AppResult<()> {
Ok(())
}

#[tokio::test]
async fn test_set() -> AppResult<()> {
Ok(())
}

#[tokio::test]
async fn test_get_all() -> AppResult<()> {
Ok(())
}

#[tokio::test]
async fn test_set_all() -> AppResult<()> {
Ok(())
}
}
30 changes: 30 additions & 0 deletions src/cache/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,33 @@ impl EntityCache for UserCache {
Ok(())
}
}

#[cfg(test)]
mod tests {
use crate::error::AppResult;

#[tokio::test]
async fn test_get_by_email() -> AppResult<()> {
Ok(())
}

#[tokio::test]
async fn test_get() -> AppResult<()> {
Ok(())
}

#[tokio::test]
async fn test_set() -> AppResult<()> {
Ok(())
}

// #[tokio::test]
// async fn test_delete() -> AppResult<()> {
// Ok(())
// }

// #[tokio::test]
// async fn test_delete_by_email() -> AppResult<()> {
// Ok(())
// }
}

0 comments on commit 0dae7a0

Please sign in to comment.