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