Skip to content

Commit

Permalink
Test for testing non-existent and null-value keys.
Browse files Browse the repository at this point in the history
  • Loading branch information
brettbuddin committed Nov 4, 2019
1 parent caa7f26 commit c235ce8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions patch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,18 @@ var TestCases = []TestCase{
false,
"/foo",
},
{
`{ "foo": "bar" }`,
`[ { "op": "test", "path": "/baz", "value": "bar" } ]`,
false,
"/baz",
},
{
`{ "foo": "bar" }`,
`[ { "op": "test", "path": "/baz", "value": null } ]`,
true,
"/baz",
},
}

func TestAllTest(t *testing.T) {
Expand Down

0 comments on commit c235ce8

Please sign in to comment.