Skip to content

Commit 9ecd703

Browse files
authored
Merge pull request #39 from mr-mixas/test-absent-from-location-for-copy-and-move-ops
test absent 'from' location for copy and move
2 parents 09dee56 + 66817e7 commit 9ecd703

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,11 +408,21 @@
408408
"patch": [ { "op": "copy", "path": "/-" } ],
409409
"error": "missing 'from' parameter" },
410410

411+
{ "comment": "missing from location to copy",
412+
"doc": { "foo": 1 },
413+
"patch": [ { "op": "copy", "from": "/bar", "path": "/foo" } ],
414+
"error": "missing 'from' location" },
415+
411416
{ "comment": "missing from parameter to move",
412417
"doc": { "foo": 1 },
413418
"patch": [ { "op": "move", "path": "" } ],
414419
"error": "missing 'from' parameter" },
415420

421+
{ "comment": "missing from location to move",
422+
"doc": { "foo": 1 },
423+
"patch": [ { "op": "move", "from": "/bar", "path": "/foo" } ],
424+
"error": "missing 'from' location" },
425+
416426
{ "comment": "duplicate ops",
417427
"doc": { "foo": "bar" },
418428
"patch": [ { "op": "add", "path": "/baz", "value": "qux",

0 commit comments

Comments
 (0)