MCPcopy Create free account
hub / github.com/Migorithm/rustiful-backend / test_create_account

Function test_create_account

library/src/domain/auth/mod.rs:53–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51
52#[test]
53fn 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}

Callers

nothing calls this directly

Calls 2

take_accountMethod · 0.80
buildMethod · 0.45

Tested by

no test coverage detected