Answer the question
In order to leave comments, you need to log in
How to do unit tests for controllers and models?
Hello!
Tell me how to learn how to do unit tests for controllers and models. Before that, there was no such experience.
Only he himself, for example, wrote a function that should perform something, calculated what should work and compared my value and what the function returns.
Answer the question
In order to leave comments, you need to log in
For controllers, unit tests are no longer written. Acceptance and functional are relevant for them.
The test for models is too abstract a question.
The abstract answer to it is just like you did for the function.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question