I have a flow that is triggered when an Opportunity is created. I'm trying to debug the flow by having it send me an email with values. When I create a record from the UI it works just fine. But when I create a record by running a test class in apex I do not get an email.
There was a setting to turn on emails in the sandbox. I have done that, which is why I can get emails when creating normally.
Is there something about doing it in apex or doing a test class that prevents emails? Is there a good way to test flow automation when a record is created by apex?