()
| 635 | |
| 636 | #[test] |
| 637 | fn test_parse_user_prompt() { |
| 638 | let hook = make_hook(); |
| 639 | let input = br#"{"session_id": "s1", "prompt": "Fix the auth bug in login.rs"}"#; |
| 640 | let event = hook.parse_event(HookType::TurnStart, input).unwrap(); |
| 641 | assert_eq!(event.session_id, "s1"); |
| 642 | assert_eq!(event.event_type, HookType::TurnStart); |
| 643 | assert_eq!( |
| 644 | event.prompt.as_deref(), |
| 645 | Some("Fix the auth bug in login.rs") |
| 646 | ); |
| 647 | } |
| 648 | |
| 649 | #[test] |
| 650 | fn test_parse_user_prompt_no_prompt() { |
nothing calls this directly
no test coverage detected