MCPcopy Create free account
hub / github.com/calfonso/rusternetes / test_json_patch_replace

Function test_json_patch_replace

crates/api-server/src/patch.rs:714–726  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

712
713 #[test]
714 fn test_json_patch_replace() {
715 let original = json!({
716 "name": "test",
717 "value": 42
718 });
719
720 let patch = json!([
721 {"op": "replace", "path": "/value", "value": 100}
722 ]);
723
724 let result = apply_json_patch(&original, &patch).unwrap();
725 assert_eq!(result["value"], 100);
726 }
727
728 #[test]
729 fn test_strategic_merge_patch_simple() {

Callers

nothing calls this directly

Calls 1

apply_json_patchFunction · 0.70

Tested by

no test coverage detected