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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user