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

Function test_json_change_serialize

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

Source from the content-addressed store, hash-verified

399
400 #[test]
401 fn test_json_change_serialize() {
402 let change = create_test_change();
403 let hash = Hash::of(b"test change");
404 let json_change = JsonChange::from_change(&change, &hash, None);
405
406 let json = serde_json::to_string_pretty(&json_change).unwrap();
407 assert!(json.contains("\"message\": \"Test change message\""));
408 assert!(json.contains("\"description\": \"This is a description\""));
409 }
410
411 #[test]
412 fn test_json_change_omits_unhashed_when_absent() {

Callers

nothing calls this directly

Calls 2

create_test_changeFunction · 0.70
unwrapMethod · 0.45

Tested by

no test coverage detected