()
| 321 | |
| 322 | #[test] |
| 323 | fn 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] |
| 339 | fn test_idle_detection_not_idle() { |
nothing calls this directly
no test coverage detected