()
| 317 | |
| 318 | #[test] |
| 319 | fn scope_grants_check() { |
| 320 | let store = ScopeStore::new(); |
| 321 | store |
| 322 | .define( |
| 323 | "profile:read", |
| 324 | vec![("read".into(), "profiles".into())], |
| 325 | vec![], |
| 326 | "admin", |
| 327 | ) |
| 328 | .unwrap(); |
| 329 | |
| 330 | assert!(store.scope_grants("profile:read", "read", "profiles")); |
| 331 | assert!(!store.scope_grants("profile:read", "write", "profiles")); |
| 332 | } |
| 333 | |
| 334 | #[test] |
| 335 | fn include_validation() { |