1
0
Fork 0
mirror of synced 2024-07-03 21:40:55 +12:00

Update accounts.cloud.internal.spec.ts

We use a randomly generated string for the accountId.

It would seem that when an accountId includes a percentage sign (%) at the end, that issues arise (400 returned instead of 404 in this case).

I have included a encodeURIComponent for the accountId after it has been generated
This commit is contained in:
Mitch-Budibase 2023-07-21 13:30:56 +01:00
parent d77a4062c7
commit aeda2a143e

View file

@ -16,7 +16,8 @@ describe("Account Internal Operations", () => {
it("performs account deletion by ID", async () => {
// Deleting by unknown id doesn't work
const accountId = generator.string()
await config.api.accounts.delete(accountId, { status: 404 })
const encodedAccountId = encodeURIComponent(accountId)
await config.api.accounts.delete(encodedAccountId, { status: 404 })
// Create new account
const [_, account] = await config.api.accounts.create({