()
| 941 | |
| 942 | #[test] |
| 943 | fn test_parse_after_tool() { |
| 944 | let hook = make_hook(); |
| 945 | let input = br#"{ |
| 946 | "session_id": "s1", |
| 947 | "tool_name": "bash", |
| 948 | "tool_call_id": "call-99", |
| 949 | "status": "completed", |
| 950 | "duration": 1500, |
| 951 | "modified_files": true |
| 952 | }"#; |
| 953 | let event = hook.parse_event(HookType::PostToolUse, input).unwrap(); |
| 954 | assert_eq!(event.session_id, "s1"); |
| 955 | assert_eq!(event.event_type, HookType::PostToolUse); |
| 956 | assert_eq!(event.tool_name.as_deref(), Some("bash")); |
| 957 | assert_eq!(event.tool_use_id.as_deref(), Some("call-99")); |
| 958 | } |
| 959 | |
| 960 | // parse_event tests: error cases |
| 961 |
nothing calls this directly
no test coverage detected