Skip to content

Commit

Permalink
Test for copying null-value key.
Browse files Browse the repository at this point in the history
  • Loading branch information
brettbuddin committed Nov 4, 2019
1 parent c235ce8 commit 2663031
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions patch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,11 @@ var Cases = []Case{
`[{"op": "copy", "path": "/foo/0", "from": "/foo"}]`,
`{ "foo": [["bar"], "bar"]}`,
},
{
`{ "foo": null}`,
`[{"op": "copy", "path": "/bar", "from": "/foo"}]`,
`{ "foo": null, "bar": null}`,
},
{
`{ "foo": ["bar","qux","baz"]}`,
`[ { "op": "remove", "path": "/foo/-2"}]`,
Expand Down

0 comments on commit 2663031

Please sign in to comment.