From d3e749d2de5352ce846bcc188fc8332981283d08 Mon Sep 17 00:00:00 2001 From: Michael Drury Date: Fri, 31 Mar 2023 23:32:33 +0100 Subject: [PATCH] Fix for 409 conflict which occurs in one of the user test cases - should stop it occurring in future. --- packages/server/src/api/routes/tests/user.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/server/src/api/routes/tests/user.spec.js b/packages/server/src/api/routes/tests/user.spec.js index 6b674a8479..afb3acfe0d 100644 --- a/packages/server/src/api/routes/tests/user.spec.js +++ b/packages/server/src/api/routes/tests/user.spec.js @@ -1,4 +1,4 @@ -const { roles } = require("@budibase/backend-core") +const { roles, utils } = require("@budibase/backend-core") const { checkPermissionsEndpoint } = require("./utilities/TestFunctions") const setup = require("./utilities") const { BUILTIN_ROLE_IDS } = roles @@ -55,7 +55,7 @@ describe("/users", () => { describe("update", () => { it("should be able to update the user", async () => { - const user = await config.createUser({ id: `us_update${Math.random()}` }) + const user = await config.createUser({ id: `us_update${utils.newid()}` }) user.roleId = BUILTIN_ROLE_IDS.BASIC const res = await request .put(`/api/users/metadata`)