MCPcopy Create free account
hub / github.com/AI45Lab/Code / test_policy_check_allow

Function test_policy_check_allow

core/src/permissions/tests.rs:156–161  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

154
155#[test]
156fn 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]
164fn test_policy_check_deny() {

Callers

nothing calls this directly

Calls 2

allowMethod · 0.80
checkMethod · 0.45

Tested by

no test coverage detected