From 263d3613be8300bb4342976cfdc82d1775480f2e Mon Sep 17 00:00:00 2001 From: adrinr Date: Mon, 13 Mar 2023 17:46:29 +0100 Subject: [PATCH] Test 404 --- .../src/api/routes/global/tests/scim/users.spec.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/worker/src/api/routes/global/tests/scim/users.spec.ts b/packages/worker/src/api/routes/global/tests/scim/users.spec.ts index 86339f4ea6..b86eb790ed 100644 --- a/packages/worker/src/api/routes/global/tests/scim/users.spec.ts +++ b/packages/worker/src/api/routes/global/tests/scim/users.spec.ts @@ -216,5 +216,14 @@ describe("/api/global/scim/v2/users", () => { expect(response).toEqual(user) }) + + it("should return 404 when requesting unexisting user id", async () => { + const response = await findScimUser(structures.uuid(), { expect: 404 }) + + expect(response).toEqual({ + message: "missing", + status: 404, + }) + }) }) })