feat: Add currency module and remove currency models from region and pricing modules (#6536)

What:
- Creates a new currency module
- Removes currency model from the pricing module
- Removes currency model from region module
This commit is contained in:
Stevche Radevski
2024-02-29 15:09:59 +00:00
committed by GitHub
parent 06f706a51a
commit dc025302a1
102 changed files with 1502 additions and 2128 deletions
@@ -38,7 +38,7 @@ describe("Regions - Admin", () => {
beforeEach(async () => {
await createAdminUser(dbConnection, adminHeaders)
await service.createDefaultCountriesAndCurrencies()
await service.createDefaultCountries()
})
afterEach(async () => {
@@ -127,25 +127,6 @@ describe("Regions - Admin", () => {
)
})
it("should throw on unknown currency in create", async () => {
const api = useApi() as any
const error = await api
.post(
`/admin/regions`,
{
currency_code: "foo",
name: "Test Region",
},
adminHeaders
)
.catch((e) => e)
expect(error.response.status).toEqual(400)
expect(error.response.data.message).toEqual(
'Currencies with codes: "foo" were not found'
)
})
it("should throw on unknown properties in create", async () => {
const api = useApi() as any
const error = await api