Closed hgylfason closed 9 months ago
@hgylfason Hello :wave:
You want to make sure you are testing the code that's actually executing the business logic.
This can be done in various ways.
By mentioning factories, I believe you are asking more about "how to setup the data for our tests".
My suggestion would be to either:
Here are some materials that you may find helpful:
Let me know if you want me to expand with more details & examples.
Cheers!
@hgylfason I'll close this for now. Feel free to reopen, if you need additional info or if you have other questions.
Cheers!
Do you have a reliable way to make sure test factories cover important business logic? To explain what I mean, let's look at the
create_user
service from the README. It doesn't just create a user; it also sets up a profile and sends a confirmation email. But a standard User model test factory only creates the user, without the extra steps.Would you have any tips or examples from your projects on how to handle this? Any insights would be very helpful.