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

Function test_parse_model_slug_only

atomic-agent/src/hooks/cline.rs:1107–1114  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1105
1106 #[test]
1107 fn test_parse_model_slug_only() {
1108 let hook = make_hook();
1109 let input = br#"{"taskId": "t1", "model": {"slug": "gpt-4o"}}"#;
1110 let event = hook.parse_event(HookType::SessionStart, input).unwrap();
1111 let raw = event.raw_json.unwrap();
1112 assert_eq!(raw["model_name"], "gpt-4o");
1113 assert!(raw.get("vendor").is_none());
1114 }
1115
1116 #[test]
1117 fn test_parse_model_not_present() {

Callers

nothing calls this directly

Calls 3

make_hookFunction · 0.70
unwrapMethod · 0.45
parse_eventMethod · 0.45

Tested by

no test coverage detected