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

Function test_policy_check_ask

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

Source from the content-addressed store, hash-verified

170
171#[test]
172fn test_policy_check_ask() {
173 let policy = PermissionPolicy::new().ask("Write(*)");
174
175 let decision = policy.check("Write", &json!({"file_path": "/tmp/test.txt"}));
176 assert_eq!(decision, PermissionDecision::Ask);
177}
178
179#[test]
180fn test_policy_check_default() {

Callers

nothing calls this directly

Calls 2

askMethod · 0.80
checkMethod · 0.45

Tested by

no test coverage detected