style: cargo fmt --all
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use domain::entities::permission::{
|
||||
admin_permissions, contributor_permissions, viewer_permissions,
|
||||
Permission, PermissionAction, ResourceType,
|
||||
Permission, PermissionAction, ResourceType, admin_permissions, contributor_permissions,
|
||||
viewer_permissions,
|
||||
};
|
||||
use domain::entities::{Group, Role, User};
|
||||
use domain::errors::DomainError;
|
||||
@@ -36,8 +36,16 @@ fn role_checks_permission() {
|
||||
|
||||
#[test]
|
||||
fn creates_user_with_unique_id() {
|
||||
let a = User::new("alice", Email::new("a@example.com").unwrap(), PasswordHash::from_hash("h".into()));
|
||||
let b = User::new("bob", Email::new("b@example.com").unwrap(), PasswordHash::from_hash("h".into()));
|
||||
let a = User::new(
|
||||
"alice",
|
||||
Email::new("a@example.com").unwrap(),
|
||||
PasswordHash::from_hash("h".into()),
|
||||
);
|
||||
let b = User::new(
|
||||
"bob",
|
||||
Email::new("b@example.com").unwrap(),
|
||||
PasswordHash::from_hash("h".into()),
|
||||
);
|
||||
assert_ne!(a.id, b.id);
|
||||
assert_eq!(a.username, "alice");
|
||||
assert_eq!(b.username, "bob");
|
||||
|
||||
Reference in New Issue
Block a user