Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Removing nonexistent field or index should fail
  • Loading branch information
norpan authored Mar 22, 2017
commit 6e51de200be01e6a8ae731a31191ce4799c137cf
12 changes: 11 additions & 1 deletion tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,16 @@
{ "comment": "test with bad array number that has leading zeros",
"doc": ["foo", "bar"],
"patch": [{"op": "test", "path": "/01", "value": "bar"}],
"error": "test op should reject the array value, it has leading zeros" }
"error": "test op should reject the array value, it has leading zeros" },

{ "comment": "Removing nonexistent field",
"doc": {"foo" : "bar"},
"patch": [{"op": "remove", "path": "/baz"}],
"error": "removing a nonexistent field should fail" },

{ "comment": "Removing nonexistent index",
"doc": ["foo", "bar"],
"patch": [{"op": "remove", "path": "/2"}],
"error": "removing a nonexistent index should fail" }

]