Skip to content

Commit

Permalink
New test for testsuite.json 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
alenkow committed Mar 15, 2024
1 parent 29da555 commit a092820
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/test/resources/jsonpatch/testsuite.json
Original file line number Diff line number Diff line change
Expand Up @@ -1101,6 +1101,39 @@
}
},

{
"comment": "remove, test, and add nested fields",
"doc": {
"user": {
"credentials": {
"username": "user1",
"password": "pass123"
},
"profile": {
"email": "[email protected]",
"phone": "123-456-7890"
}
}
},
"patch": [
{"op": "remove", "path": "/user/credentials/password"},
{"op": "test", "path": "/user/profile/email", "value": "[email protected]"},
{"op": "add", "path": "/user/profile/age", "value": 25}
],
"expected": {
"user": {
"credentials": {
"username": "user1"
},
"profile": {
"email": "[email protected]",
"phone": "123-456-7890",
"age": 25
}
}
}
},

{
"comment": "tests complete"
}
Expand Down

0 comments on commit a092820

Please sign in to comment.