()
| 768 | |
| 769 | #[test] |
| 770 | fn test_parse_user_prompt_with_model() { |
| 771 | let hook = make_hook(); |
| 772 | let input = br#"{ |
| 773 | "taskId": "prompt-4", |
| 774 | "model": {"provider": "anthropic", "slug": "claude-sonnet-4-5"}, |
| 775 | "userPromptSubmit": {"prompt": "hello"} |
| 776 | }"#; |
| 777 | let event = hook.parse_event(HookType::TurnStart, input).unwrap(); |
| 778 | let raw = event.raw_json.unwrap(); |
| 779 | assert_eq!(raw["model_name"], "claude-sonnet-4-5"); |
| 780 | assert_eq!(raw["vendor"], "anthropic"); |
| 781 | } |
| 782 | |
| 783 | // ── parse_event tests: pre-tool (PreToolUse) ──────────────────── |
| 784 |
nothing calls this directly
no test coverage detected