josephspurrier / gowebapp

Basic MVC Web Application in Go
MIT License
1.14k stars 197 forks source link

How to test controllers? #25

Closed Zhomart closed 7 years ago

josephspurrier commented 7 years ago

Good question. The controllers are not easy to test because not all of the dependencies are injected.

I would start here: https://stackoverflow.com/questions/40680498/how-do-i-test-http-request-handlers-in-golang