Unit Tests: Should we create them?
I was reviewing this plugin last night and I realized that there were no unit tests within this plugin. I think we should create a couple of them to at least show these use cases.
- [ ] Ping a public REST API endpoint - PASS
- [ ] Ping a private REST API endpoint - FAIL
- [ ] List passwords - PASS
- [ ] Revoke passwords - PASS
- [ ] Create passwords with a password - FAIL
Let me know if you have anymore. I am going to start creating these and send you a PR soon.
@kasparsd it looks like you've added tests recently. Are there any others that you feel could/should be added or can we close out this issue?
Yeah, unfortunately is just one set of tests for the HTTP login part of the codebase. Would be nice to add some coverage for the areas that @kjbenk mentioned. @jeffpaul Would you suggest opening a new issue for that and defining the critical areas to be tested or repurpose this issue?
@kasparsd might as well repurpose this issue and update the checklist in the original description or note what the current checklist items to resolve are in a subsequent comment so we can work towards adding those tests and getting this work closed out.