Do we need to do unit tests for controllers when we do integration tests?
Or the integration is enough ?
I usually skip unit tests for controllers when theyāre covered by integration tests.
One exception is that Iāll sometimes test things like āmake sure logged-out users canāt see thisā, or āmake sure a user canāt see another userās private messagesā with controller tests. Itās sometimes easier to test them directly this way, rather than exercising the whole app stack.
5 Likes