()
| 770 | |
| 771 | #[test] |
| 772 | fn test_parse_user_prompt() { |
| 773 | let hook = make_hook(); |
| 774 | let input = br#"{"session_id": "s1", "prompt": "Fix the auth bug in login.rs"}"#; |
| 775 | let event = hook.parse_event(HookType::TurnStart, input).unwrap(); |
| 776 | assert_eq!(event.session_id, "s1"); |
| 777 | assert_eq!(event.event_type, HookType::TurnStart); |
| 778 | assert_eq!( |
| 779 | event.prompt.as_deref(), |
| 780 | Some("Fix the auth bug in login.rs") |
| 781 | ); |
| 782 | } |
| 783 | |
| 784 | #[test] |
| 785 | fn test_parse_user_prompt_no_prompt() { |
nothing calls this directly
no test coverage detected