Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zupzup committed Nov 26, 2024
1 parent 763a58d commit 9372c42
Show file tree
Hide file tree
Showing 3 changed files with 642 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/persistence/company.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ use tokio::{
task,
};

#[cfg(test)]
use mockall::automock;

#[cfg_attr(test, automock)]
#[async_trait]
pub trait CompanyStoreApi: Send + Sync {
/// Checks if the given company exists
Expand Down
4 changes: 4 additions & 0 deletions src/persistence/contact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ use std::{collections::HashMap, fs, path::Path};
use super::{file_storage_path, Error, Result};
use async_trait::async_trait;

#[cfg(test)]
use mockall::automock;

#[cfg_attr(test, automock)]
#[async_trait]
pub trait ContactStoreApi: Send + Sync {
async fn get_map(&self) -> Result<HashMap<String, IdentityPublicData>>;
Expand Down
Loading

0 comments on commit 9372c42

Please sign in to comment.