-
-
Notifications
You must be signed in to change notification settings - Fork 275
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
tests for collection/add
and collection/remove
#483
tests for collection/add
and collection/remove
#483
Conversation
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.
OK, this PR is pretty smooth !
A couple of details below, but this is nice and tight !
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.
Looking great now, well done !
I'm liking the progress on the testing!
I approved too fast…sorry!
These 5 tests are currently missing, and raise some questions about the routes' implementation (that's why we love tests! :p).
|
@MonkeyDo Have a look at this :) |
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.
We're making this more and more solid by the minute, which is great :)
Think of all the errors that could have been thrown in the future which will now be caught and explained to the user… Much less work downstream !
Most of the suggestions below are regarding error message wording.
The general rules are:
- make it clear it's an error
- make the error unambiguous (no way you could misinterpret what's happening)
- give a hint for how to solve the issue, especially if the cause is not completely obvious ('Invalid BBID' is quite obvious for example)
- If there are multiple entries and one fails, let the user know which one ('Invalid BBID: ${bbid}')
- Ask yourself: "as a programmer, if I got this error, would I understand what it's about and how to fix it ?"
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.
Same on this good PR, one final detail and ready to merge :)
Nice testing !
🚀 ! |
Problem
tests for POST
collection/collectionId/add