MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_format_json_basic

Function test_format_json_basic

atomic-cli/src/commands/change/tests.rs:477–486  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

create_test_changeFunction · 0.70
format_jsonMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected