()
| 591 | |
| 592 | #[test] |
| 593 | fn test_parse_post_tool_use() { |
| 594 | let hook = make_hook(); |
| 595 | let input = br#"{ |
| 596 | "session_id": "abc123-kilo", |
| 597 | "tool_name": "bash", |
| 598 | "tool_call_id": "call-42", |
| 599 | "cwd": "/tmp/project" |
| 600 | }"#; |
| 601 | let event = hook.parse_event(HookType::PostToolUse, input).unwrap(); |
| 602 | assert_eq!(event.session_id, "abc123-kilo"); |
| 603 | assert_eq!(event.event_type, HookType::PostToolUse); |
| 604 | assert_eq!(event.tool_name.as_deref(), Some("bash")); |
| 605 | assert_eq!(event.tool_use_id.as_deref(), Some("call-42")); |
| 606 | } |
| 607 | |
| 608 | // -- Detection tests -- |
| 609 |
nothing calls this directly
no test coverage detected