()
| 211 | use crate::types::TenantId; |
| 212 | |
| 213 | fn make_auth() -> AuthContext { |
| 214 | let identity = AuthenticatedIdentity { |
| 215 | user_id: 123, |
| 216 | username: "alice".into(), |
| 217 | tenant_id: TenantId::new(1), |
| 218 | roles: vec![Role::ReadWrite], |
| 219 | auth_method: AuthMethod::ApiKey, |
| 220 | is_superuser: false, |
| 221 | default_database: None, |
| 222 | accessible_databases: crate::control::security::identity::DatabaseSet::Some( |
| 223 | smallvec::smallvec![nodedb_types::id::DatabaseId::DEFAULT], |
| 224 | ), |
| 225 | }; |
| 226 | AuthContext::from_identity(&identity, "test-session".into()) |
| 227 | } |
| 228 | |
| 229 | #[test] |
| 230 | fn simple_equality_substitution() { |
no outgoing calls