What's correct unit testing?
In codebase I am working on some devs are writing unit tests that test Controller level - tests if endpoint returns 200 for example. They mock repository/DAL layer and ignore service layer.
Wouldn't the correct thing to do be just mock the service layer and then test service layer functions separately and mock repo layer in that test?
Wouldn't the correct thing to do be just mock the service layer and then test service layer functions separately and mock repo layer in that test?