(is_admin: bool, is_tenant: bool)
| 127 | } |
| 128 | |
| 129 | pub async fn create_api_key(is_admin: bool, is_tenant: bool) -> ApiKey { |
| 130 | let ak = ApiKey { |
| 131 | name: "test api key".into(), |
| 132 | is_admin, |
| 133 | tenant_id: match is_tenant { |
| 134 | false => None, |
| 135 | true => Some(tenant::test::create_tenant().await.id), |
| 136 | }, |
| 137 | ..Default::default() |
| 138 | }; |
| 139 | |
| 140 | create(ak).await.unwrap() |
| 141 | } |
| 142 | |
| 143 | #[tokio::test] |
| 144 | async fn api_key() { |
no test coverage detected