()
| 506 | |
| 507 | #[test] |
| 508 | fn test_format_json_basic() { |
| 509 | let cmd = ChangeCmd::new(); |
| 510 | let change = create_test_change(); |
| 511 | let hash = Hash::of(b"test"); |
| 512 | let output = cmd.format_json(&change, &hash, Some(10)); |
| 513 | |
| 514 | let parsed: serde_json::Value = serde_json::from_str(&output).unwrap(); |
| 515 | assert_eq!(parsed["message"], "Test change message"); |
| 516 | assert_eq!(parsed["sequence"], 10); |
| 517 | } |
| 518 | |
| 519 | #[test] |
| 520 | fn test_format_json_no_sequence() { |
nothing calls this directly
no test coverage detected