From 2718d30a3df525c31454dd4dc24dd0d786a401da Mon Sep 17 00:00:00 2001 From: Max Bruckner Date: Mon, 20 Nov 2017 22:04:57 +0100 Subject: [PATCH] Squashed 'tests/json-patch-tests/' changes from 0dd0fbc..99264bb 99264bb Merge pull request #37 from FormAPI/missing_parent_key c2fae3a Added a test case to check replace op with a missing parent key git-subtree-dir: tests/json-patch-tests git-subtree-split: 99264bb634d32c03df7472f21afb7d3681d8619e --- tests.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests.json b/tests.json index 28fe4bc..86305c1 100644 --- a/tests.json +++ b/tests.json @@ -202,6 +202,11 @@ "patch": [{"op": "replace", "path": "", "value": {"baz": "qux"}}], "expected": {"baz": "qux"} }, + { "comment": "test replace with missing parent key should fail", + "doc": {"bar": "baz"}, + "patch": [{"op": "replace", "path": "/foo/bar", "value": false}], + "error": "replace op should fail with missing parent key" }, + { "comment": "spurious patch properties", "doc": {"foo": 1}, "patch": [{"op": "test", "path": "/foo", "value": 1, "spurious": 1}],