()
| 755 | |
| 756 | #[test] |
| 757 | fn test_parse_user_prompt_submit() { |
| 758 | let input = br#"{ |
| 759 | "session_id": "sess-123", |
| 760 | "prompt": "fix the hook", |
| 761 | "model": "gpt-5.5" |
| 762 | }"#; |
| 763 | let event = make_hook().parse_event(HookType::TurnStart, input).unwrap(); |
| 764 | assert_eq!(event.session_id, "sess-123"); |
| 765 | assert_eq!(event.event_type, HookType::TurnStart); |
| 766 | assert_eq!(event.prompt.as_deref(), Some("fix the hook")); |
| 767 | assert_eq!(event.raw_json.unwrap()["provider"], "openai"); |
| 768 | } |
| 769 | |
| 770 | #[test] |
| 771 | fn test_parse_user_prompt_submit_empty_prompt_is_none() { |
nothing calls this directly
no test coverage detected