fix: Move default country loading for region to the loader, fix a bug with cascade (#6559)

This commit is contained in:
Stevche Radevski
2024-03-01 14:58:55 +01:00
committed by GitHub
parent 56d97ebef9
commit 347aba719c
16 changed files with 87 additions and 121 deletions

View File

@@ -40,13 +40,13 @@ describe("API Keys - Admin", () => {
beforeEach(async () => {
await createAdminUser(dbConnection, adminHeaders)
// Used for testing cross-module authentication checks
await regionService.createDefaultCountries()
})
afterEach(async () => {
const db = useDb()
// TODO: Once teardown doesn't skip constraint checks and cascades, we can remove this
const existingRegions = await regionService.list({})
await regionService.delete(existingRegions.map((r) => r.id))
await db.teardown()
})