()
| 51 | |
| 52 | #[test] |
| 53 | fn test_create_account() { |
| 54 | let auth_builder = AuthAggregate::builder(); |
| 55 | let account = Account::new( |
| 56 | "Migo".into(), |
| 57 | "migo@mail.com".into(), |
| 58 | "testpass".into(), |
| 59 | "Mago".into(), |
| 60 | ); |
| 61 | let auth_aggregate = auth_builder.take_account(account).build(); |
| 62 | |
| 63 | assert_ne!( |
| 64 | auth_aggregate.account.hashed_password, |
| 65 | "testpass".to_string() |
| 66 | ); |
| 67 | assert!(bcrypt::verify("testpass", &auth_aggregate.account.hashed_password).unwrap()); |
| 68 | assert!(auth_aggregate.account.verify_password("testpass")) |
| 69 | } |
nothing calls this directly
no test coverage detected