()
| 484 | |
| 485 | #[test] |
| 486 | fn test_author_json_roundtrip() { |
| 487 | let author = Author::new("Alice", Some("alice@example.com")); |
| 488 | let json = serde_json::to_string(&author).unwrap(); |
| 489 | let parsed: Author = serde_json::from_str(&json).unwrap(); |
| 490 | assert_eq!(author, parsed); |
| 491 | } |
| 492 | |
| 493 | #[test] |
| 494 | fn test_author_json_minimal() { |