Prompted by a number of questions in the Go Slack community (and elsewhere!), I’ve written up a short article on how to:
- Unit test your handlers
context.Contexts for testing with
- Stub out database calls in your tests
I hope it’s useful, and happy to take feedback here.