Closed suho closed 11 months ago
@suho you're right. I get confused when I need to write a unit test. I need to connect to a real API or mockup, so this is good advice. I am going to fix my unit test to change to mockup data.
I appreciate your advice.
Issues
Currently, you are calling real APIs for unit tests. For instance, https://github.com/SchwartzLizer/NimbleSurvey/blob/ddfb80dcf8bc3a802aa6cc46158444bf75e38101/NimbleSurvey/NimbleSurveyTests/Login/LoginUnitTest.swift#L41
For unit tests, we should not use real APIs. We should mock the NetworkManager. What do you think?