|
|
|
|
|
by MakersF
1793 days ago
|
|
> The article talks briefly about mocking your database: definitely never do this. I definitely recommend doing this for same tests: it's the only way to check how your application behaves in case of failures. The best thing would be to have a DB where you can inject failures, but I'm not aware of any.
So test
- the happy path on the real db
- the sad path on the mock/fake (which might be a light wrapper around a real db, but with the ability of injecting failures) |
|