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

Function test_json_patch_add

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

Source from the content-addressed store, hash-verified

683
684 #[test]
685 fn test_json_patch_add() {
686 let original = json!({
687 "name": "test"
688 });
689
690 let patch = json!([
691 {"op": "add", "path": "/value", "value": 42}
692 ]);
693
694 let result = apply_json_patch(&original, &patch).unwrap();
695 assert_eq!(result["value"], 42);
696 }
697
698 #[test]
699 fn test_json_patch_remove() {

Callers

nothing calls this directly

Calls 1

apply_json_patchFunction · 0.70

Tested by

no test coverage detected