MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_parse_user_prompt_submit

Function test_parse_user_prompt_submit

atomic-agent/src/hooks/codex.rs:758–769  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected