From 5990e347f1d487d1e688991415bfb67a9d631acc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thadd=C3=A9e=20Tyl?= Date: Tue, 23 Aug 2016 18:46:33 +0200 Subject: [PATCH] Test the removal of the whole document See also https://github.com/json-patch/json-patch2/issues/17 --- tests.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests.json b/tests.json index c6f34c3..44fa7d1 100644 --- a/tests.json +++ b/tests.json @@ -216,6 +216,11 @@ "expected": {}, "comment": "null value should be valid obj property to be removed" }, + { "doc": 1, + "patch": [{"op": "remove", "path": ""}], + "expected": null, + "comment": "remove whole document" }, + { "doc": {"foo": "bar"}, "patch": [{"op": "replace", "path": "/foo", "value": null}], "expected": {"foo": null},