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

Function domain_alias_info_roundtrip

atomic-teams/src/domain.rs:148–163  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

146
147 #[test]
148 fn domain_alias_info_roundtrip() {
149 let info = DomainAliasInfo {
150 id: Uuid::new_v4(),
151 org_id: Uuid::new_v4(),
152 domain: "eng.acme.com".into(),
153 status: "pending".into(),
154 verification_method: "dns-txt".into(),
155 verification_token: Some("tok_abc".into()),
156 };
157 let json = serde_json::to_string(&info).unwrap();
158 let de: DomainAliasInfo = serde_json::from_str(&json).unwrap();
159 assert_eq!(de.domain, "eng.acme.com");
160 assert_eq!(de.status, "pending");
161 assert_eq!(de.verification_method, "dns-txt");
162 assert_eq!(de.verification_token.as_deref(), Some("tok_abc"));
163 }
164}

Callers

nothing calls this directly

Calls 1

unwrapMethod · 0.45

Tested by

no test coverage detected