()
| 856 | |
| 857 | #[test] |
| 858 | fn test_parse_after_tool() { |
| 859 | let hook = make_hook(); |
| 860 | let input = br#"{ |
| 861 | "session_id": "s1", |
| 862 | "tool_name": "bash", |
| 863 | "tool_call_id": "call-99", |
| 864 | "status": "completed", |
| 865 | "duration": 1500, |
| 866 | "modified_files": true |
| 867 | }"#; |
| 868 | let event = hook.parse_event(HookType::PostToolUse, input).unwrap(); |
| 869 | assert_eq!(event.session_id, "s1"); |
| 870 | assert_eq!(event.event_type, HookType::PostToolUse); |
| 871 | assert_eq!(event.tool_name.as_deref(), Some("bash")); |
| 872 | assert_eq!(event.tool_use_id.as_deref(), Some("call-99")); |
| 873 | } |
| 874 | |
| 875 | // parse_event tests: error cases |
| 876 |
nothing calls this directly
no test coverage detected