Skip to content

Commit 260f59d

Browse files
committed
Add test for deep nonexistent path
Related PR - fixing an unhandled exception in a Ruby implementation of JSON patch: tenderlove/hana#15
1 parent f42d357 commit 260f59d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,11 @@
465465
"patch": [{"op": "remove", "path": "/baz"}],
466466
"error": "removing a nonexistent field should fail" },
467467

468+
{ "comment": "Removing deep nonexistent path",
469+
"doc": {"foo" : "bar"},
470+
"patch": [{"op": "remove", "path": "/missing1/missing2"}],
471+
"error": "removing a nonexistent field should fail" },
472+
468473
{ "comment": "Removing nonexistent index",
469474
"doc": ["foo", "bar"],
470475
"patch": [{"op": "remove", "path": "/2"}],

0 commit comments

Comments
 (0)