()
| 224 | |
| 225 | #[test] |
| 226 | fn test_policy_is_allowed() { |
| 227 | let policy = PermissionPolicy::new().allow("Bash(cargo:*)"); |
| 228 | |
| 229 | assert!(policy.is_allowed("Bash", &json!({"command": "cargo build"}))); |
| 230 | assert!(!policy.is_allowed("Bash", &json!({"command": "npm install"}))); |
| 231 | } |
| 232 | |
| 233 | #[test] |
| 234 | fn test_policy_is_denied() { |