Improve test coverage
This issue serves as a parent tracking issue for several sub issues for improving test coverage in hcb. For any of the specific issues for a given file/directory, feel free to break up the additional tests into as many smaller PRs as makes sense. Also if it makes sense to add tests to some other parts of the codebase due to factory improvements, call those out but feel free to make those changes as well.
We will loosely follow recommendations from these 2 resources
- https://www.codewithjason.com/complete-guide-to-rails-testing/
- https://books.thoughtbot.com/books/testing-rails.html
I'd like to consider moving back to minitest for testing before we make any progress on this, since this will basically be the last time we can do this without gutting an entire comprehensive test suite. Besides the benefits listed here, it'll also make our testing setups consistent with our other Rails apps, like Hackathons.
@northeastprince that falls under a different scope than this ticket. Right now this is just tracking improving coverage by writing tests for the above listed areas of the codebase.
Yeah, but if we end up moving back to the default testing setup, we'll have to rewrite more tests.
@northeastprince I understand, but this isn't the place to discuss that. This ticket is to track improving our test coverage and rewriting our tests from scratch doesn't help us reach that goal & could distract from efforts to reach it (it could read like we're calling our original goal into question).
If you think rspec isn't the right tool for the job that's fine, but should be brought up in a separate place (slack or GH discussion) to not derail the people working on this ticket.