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
This commit is contained in:
parent
f31167dd95
commit
3626f8a11b
10 changed files with 291 additions and 151 deletions
23
backend/tests/utils/mock_email.rs
Normal file
23
backend/tests/utils/mock_email.rs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
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(())
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue