()
| 475 | |
| 476 | #[test] |
| 477 | fn test_format_json_basic() { |
| 478 | let cmd = ChangeCmd::new(); |
| 479 | let change = create_test_change(); |
| 480 | let hash = Hash::of(b"test"); |
| 481 | let output = cmd.format_json(&change, &hash, Some(10)); |
| 482 | |
| 483 | let parsed: serde_json::Value = serde_json::from_str(&output).unwrap(); |
| 484 | assert_eq!(parsed["message"], "Test change message"); |
| 485 | assert_eq!(parsed["sequence"], 10); |
| 486 | } |
| 487 | |
| 488 | #[test] |
| 489 | fn test_format_json_no_sequence() { |
nothing calls this directly
no test coverage detected