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

Function test_agent_identity_roundtrip

atomic-config/src/lib.rs:1930–1941  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1928
1929 #[test]
1930 fn test_agent_identity_roundtrip() {
1931 let config = GlobalConfig {
1932 agent_identity: Some("fred+opencode".to_string()),
1933 ..GlobalConfig::default()
1934 };
1935
1936 let toml_str = toml::to_string_pretty(&config).unwrap();
1937 assert!(toml_str.contains("agent_identity = \"fred+opencode\""));
1938
1939 let parsed: GlobalConfig = toml::from_str(&toml_str).unwrap();
1940 assert_eq!(parsed.agent_identity.as_deref(), Some("fred+opencode"));
1941 }
1942
1943 #[test]
1944 fn test_agent_identity_absent_in_legacy_configs() {

Callers

nothing calls this directly

Calls 1

unwrapMethod · 0.45

Tested by

no test coverage detected