()
| 492 | |
| 493 | #[test] |
| 494 | fn test_author_json_minimal() { |
| 495 | // JSON with just name should work |
| 496 | let json = r#"{"name": "Bob"}"#; |
| 497 | let author: Author = serde_json::from_str(json).unwrap(); |
| 498 | assert_eq!(author.name, "Bob"); |
| 499 | assert!(author.email.is_none()); |
| 500 | } |
| 501 | |
| 502 | #[test] |
| 503 | fn test_author_json_with_identity() { |