recipes/backend/tests/utils/mock_email.rs
Greg Burri 3626f8a11b Update dependencies and implement email service integration
- Refactor app and email modules to include email service
- Add tests for user sign-up and mock email service
2025-05-02 00:57:32 +02:00

23 lines
446 B
Rust

use std::sync::Arc;
use recipes::email;
pub struct MockEmailService;
impl MockEmailService {
pub fn create_service() -> Arc<dyn email::EmailServiceTrait> {
Arc::new(Self {})
}
}
#[async_trait::async_trait]
impl email::EmailServiceTrait for MockEmailService {
async fn send_email(
&self,
_email: &str,
_title: &str,
_message: &str,
) -> Result<(), email::Error> {
Ok(())
}
}