Standing in for the real thingintermediate
When a function returns nothing and just calls something else, you test it by passing in a fake that writes down what it was asked to do — no network, no cost, no message sent to a real customer.
A test that hits a real database and a real mail server. Replace both, and assert on the calls.
No real dependencies, a stubbed return value, and a verified call with Times.Once.
Published in full, before you start — every point is one of these and there is nothing else.
When a function returns nothing and just calls something else, you test it by passing in a fake that writes down what it was asked to do — no network, no cost, no message sent to a real customer.