()
| 543 | |
| 544 | #[test] |
| 545 | fn test_parse_post_tool_use_success() { |
| 546 | let hook = make_hook(); |
| 547 | let input = br#"{ |
| 548 | "conversationId": "ec33ebf9", |
| 549 | "transcriptPath": "/tmp/transcript.jsonl", |
| 550 | "workspacePaths": ["/workspace/project"], |
| 551 | "stepIdx": 5, |
| 552 | "error": "" |
| 553 | }"#; |
| 554 | let event = hook.parse_event(HookType::PostToolUse, input).unwrap(); |
| 555 | assert_eq!(event.session_id, "ec33ebf9"); |
| 556 | assert_eq!(event.event_type, HookType::PostToolUse); |
| 557 | assert_eq!(event.tool_use_id.as_deref(), Some("5")); |
| 558 | let raw = event.raw_json.unwrap(); |
| 559 | assert_eq!(raw.get("status").and_then(Value::as_str), Some("completed")); |
| 560 | } |
| 561 | |
| 562 | #[test] |
| 563 | fn test_parse_post_tool_use_error() { |
nothing calls this directly
no test coverage detected