perf(struct): ddd
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
use iam_service::application::services::{
|
||||
AuthService, AuthorizationService, RoleService, TenantService,
|
||||
};
|
||||
use iam_service::models::{CreateRoleRequest, CreateTenantRequest, CreateUserRequest};
|
||||
use iam_service::services::{AuthService, AuthorizationService, RoleService, TenantService};
|
||||
use sqlx::PgPool;
|
||||
use uuid::Uuid;
|
||||
|
||||
#[tokio::test]
|
||||
async fn role_permission_grant_and_wildcard_match()
|
||||
-> Result<(), Box<dyn std::error::Error>> {
|
||||
async fn role_permission_grant_and_wildcard_match() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let database_url = match std::env::var("DATABASE_URL") {
|
||||
Ok(v) if !v.trim().is_empty() => v,
|
||||
_ => return Ok(()),
|
||||
@@ -71,12 +72,7 @@ async fn role_permission_grant_and_wildcard_match()
|
||||
.await?;
|
||||
|
||||
role_service
|
||||
.grant_permissions_to_role(
|
||||
tenant.id,
|
||||
role.id,
|
||||
vec!["cms:*:*".to_string()],
|
||||
admin.id,
|
||||
)
|
||||
.grant_permissions_to_role(tenant.id, role.id, vec!["cms:*:*".to_string()], admin.id)
|
||||
.await?;
|
||||
|
||||
role_service
|
||||
@@ -89,4 +85,3 @@ async fn role_permission_grant_and_wildcard_match()
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user