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