I will play the devil's advocate here, since I know that I am probably in the minority with this opinion: I really prefer to do extremely thorough controller testing. A few reasons:
1) Itβs easier for me to systematically check every path and result at the controller level than at the integration testing level. My integration tests are, first of all, only happy paths and some of the most common error paths.
2) At the controller level, there are many potential security issues. Thorough testing helps me ensure that nothing malicious can go through my model logic.
3) This is subjective, but it really makes me think of some of the long-tailed paths that my application can go through. What if someone tries to use an invalid reset token in the url? Testing the controller ensures that I consider all options.
4) Unlike integration tests, they are fairly straightforward to test. Every action is just a ruby ββmethod!
Bryce source share