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

Function test_map_decision_block

core/src/ahp/executor_tests.rs:323–336  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

321
322#[test]
323fn test_map_decision_block() {
324 let executor = make_test_executor();
325
326 let decision = Decision::Block {
327 reason: "Dangerous command".to_string(),
328 metadata: None,
329 };
330
331 let result = executor.map_decision(
332 EventType::PreAction,
333 serde_json::to_value(decision).unwrap(),
334 );
335 assert!(matches!(result, HookResult::Block(_)));
336}
337
338#[test]
339fn test_idle_detection_not_idle() {

Callers

nothing calls this directly

Calls 2

make_test_executorFunction · 0.85
map_decisionMethod · 0.80

Tested by

no test coverage detected