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

Function test_author_from_identity

atomic-identity/src/identity.rs:760–770  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

758
759 #[test]
760 fn test_author_from_identity() {
761 let identity = Identity::builder("alice")
762 .email("alice@example.com")
763 .build()
764 .unwrap();
765
766 let author: Author = (&identity).into();
767 assert_eq!(author.name, "alice");
768 assert_eq!(author.email, Some("alice@example.com".to_string()));
769 assert!(author.identity.is_some());
770 }
771
772 #[test]
773 fn test_identity_json_roundtrip() {

Callers

nothing calls this directly

Calls 3

emailMethod · 0.80
unwrapMethod · 0.45
buildMethod · 0.45

Tested by

no test coverage detected