()
| 915 | |
| 916 | #[test] |
| 917 | fn test_parse_user_prompt_submit() { |
| 918 | let input = br#"{ |
| 919 | "session_id": "sess-123", |
| 920 | "prompt": "fix the hook", |
| 921 | "model": "gpt-5.5" |
| 922 | }"#; |
| 923 | let event = make_hook().parse_event(HookType::TurnStart, input).unwrap(); |
| 924 | assert_eq!(event.session_id, "sess-123"); |
| 925 | assert_eq!(event.event_type, HookType::TurnStart); |
| 926 | assert_eq!(event.prompt.as_deref(), Some("fix the hook")); |
| 927 | assert_eq!(event.raw_json.unwrap()["provider"], "openai"); |
| 928 | } |
| 929 | |
| 930 | #[test] |
| 931 | fn test_parse_user_prompt_submit_empty_prompt_is_none() { |
nothing calls this directly
no test coverage detected