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

Function test_author_from_identity

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

Source from the content-addressed store, hash-verified

726
727 #[test]
728 fn test_author_from_identity() {
729 let identity = Identity::builder("alice")
730 .email("alice@example.com")
731 .build()
732 .unwrap();
733
734 let author: Author = (&identity).into();
735 assert_eq!(author.name, "alice");
736 assert_eq!(author.email, Some("alice@example.com".to_string()));
737 assert!(author.identity.is_some());
738 }
739
740 #[test]
741 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