()
| 154 | |
| 155 | #[test] |
| 156 | fn test_policy_check_allow() { |
| 157 | let policy = PermissionPolicy::new().allow("Bash(cargo:*)"); |
| 158 | |
| 159 | let decision = policy.check("Bash", &json!({"command": "cargo build"})); |
| 160 | assert_eq!(decision, PermissionDecision::Allow); |
| 161 | } |
| 162 | |
| 163 | #[test] |
| 164 | fn test_policy_check_deny() { |