()
| 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() { |