If I generate a controller and a model with with mix phoenix.gen.json # Generates a controller and model for a JSON based resource the resulting controller calls the database directly through Ecto and the related tests expects a test database to be present.
Creating it it’s not a big deal because Ecto sets it up itself, my main concern is that this way tests have a dependency on an external component when they could work as well with a mocked (or in memory) database.
Is there any reason behind requiring a real database for these tests?