-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
findOneAndUpdate()
and findOneAndReplace()
to return document when no data change
#392
Conversation
findOneAndUpdate()
return document when no data changefindOneAndUpdate()
and findOneAndReplace()
to return document when no data change
@@ -176,7 +175,7 @@ public void byIdWithIdNoChange() { | |||
.post(CollectionResource.BASE_PATH, namespaceName, collectionName) | |||
.then() | |||
.statusCode(200) | |||
.body("data.docs", hasSize(0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could maybe change to check hasSize(1)
(to prevent accepting returning multiple documents)
.post(CollectionResource.BASE_PATH, namespaceName, collectionName) | ||
.then() | ||
.statusCode(200) | ||
.body("data.docs[0]", jsonEquals(document)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check for hasSize(1)
as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, added minor suggestions for testing returned document counts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
* support sort with `find()` * add sort to findOne(), findOneAndUpdate(), findOneAndReplace() * quick fix for tests * add findOneAndDelete(), count() implementation * quick indent fix, skip test for stargate/data-api#392
What this PR does:
findOneAndUpdate()
return document when no data changeWhich issue(s) this PR fixes:
Fixes #390
Checklist