From aeda2a143e3573ed50f8488e70b5c9ef010b451c Mon Sep 17 00:00:00 2001 From: Mitch-Budibase Date: Fri, 21 Jul 2023 13:30:56 +0100 Subject: [PATCH] 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 --- .../account-api/tests/accounts/accounts.cloud.internal.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qa-core/src/account-api/tests/accounts/accounts.cloud.internal.spec.ts b/qa-core/src/account-api/tests/accounts/accounts.cloud.internal.spec.ts index fc5eb57de7..d3c162ea95 100644 --- a/qa-core/src/account-api/tests/accounts/accounts.cloud.internal.spec.ts +++ b/qa-core/src/account-api/tests/accounts/accounts.cloud.internal.spec.ts @@ -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({