Skip to content

Commit c5a4a10

Browse files
author
Mike McCabe
committed
Update 'move' and 'copy' tests - 'to' is now 'path'. Fixes #4.
1 parent 9519ccf commit c5a4a10

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,19 +223,19 @@
223223

224224
{ "comment": "Move to same location has no effect",
225225
"doc": {"foo": 1},
226-
"patch": [{"op": "move", "path": "/foo", "to": "/foo"}],
226+
"patch": [{"op": "move", "from": "/foo", "path": "/foo"}],
227227
"expected": {"foo": 1} },
228228

229229
{ "doc": {"foo": 1, "baz": [{"qux": "hello"}]},
230-
"patch": [{"op": "move", "path": "/foo", "to": "/bar"}],
230+
"patch": [{"op": "move", "from": "/foo", "path": "/bar"}],
231231
"expected": {"baz": [{"qux": "hello"}], "bar": 1} },
232232

233233
{ "doc": {"baz": [{"qux": "hello"}], "bar": 1},
234-
"patch": [{"op": "move", "path": "/baz/0/qux", "to": "/baz/1"}],
234+
"patch": [{"op": "move", "from": "/baz/0/qux", "path": "/baz/1"}],
235235
"expected": {"baz": [{}, "hello"], "bar": 1} },
236236

237237
{ "doc": {"baz": [{"qux": "hello"}], "bar": 1},
238-
"patch": [{"op": "copy", "path": "/baz/0", "to": "/boo"}],
238+
"patch": [{"op": "copy", "from": "/baz/0", "path": "/boo"}],
239239
"expected": {"baz":[{"qux":"hello"}],"bar":1,"boo":{"qux":"hello"}} },
240240

241241
{ "comment": "tests complete" }

0 commit comments

Comments
 (0)