Closed nelsonic closed 1 year ago
At present there is a api_test_mock_data.sql file:
api_test_mock_data.sql
https://github.com/dwyl/mvp/blob/e8df0173b981236301375d181cfa5ec9510ed9f1/lib/api/api_test_mock_data.sql#L1-L10
This seeds data for running the API Tests. As much as I prefer "raw" SQL to Ecto, this is not the Phoenix way of inserting seed data. As noted in: https://github.com/dwyl/mvp/pull/276#pullrequestreview-1264712918 we need to:
API
SQL
Ecto
Phoenix
.sql
seeds.exs
MIX_ENV=dev mix ecto.setup
At present there is a
api_test_mock_data.sql
file:https://github.com/dwyl/mvp/blob/e8df0173b981236301375d181cfa5ec9510ed9f1/lib/api/api_test_mock_data.sql#L1-L10
This seeds data for running the
API
Tests. As much as I prefer "raw"SQL
toEcto
, this is not thePhoenix
way of inserting seed data. As noted in: https://github.com/dwyl/mvp/pull/276#pullrequestreview-1264712918 we need to:.sql
file toseeds.exs
to better utilise the existingPhoenix
setup functions. i.e. when I runMIX_ENV=dev mix ecto.setup
this data will be populated so that I can run theAPI
tests.