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

Function test_identity_usage_from_str

atomic-identity/src/usage.rs:278–285  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

276
277 #[test]
278 fn test_identity_usage_from_str() {
279 let usage: IdentityUsage = "work".into();
280 assert!(usage.is_work());
281
282 let custom: IdentityUsage = "my-custom".into();
283 assert!(custom.is_custom());
284 assert_eq!(custom.custom_name(), Some("my-custom"));
285 }
286
287 #[test]
288 fn test_identity_usage_custom_constructor() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected