From 89957f549002464e663c5d525052b00947409e45 Mon Sep 17 00:00:00 2001 From: adrinr Date: Tue, 14 Mar 2023 15:08:54 +0100 Subject: [PATCH] Fix merge conflicts --- .../src/api/routes/global/tests/scim/users.spec.ts | 10 +++++++--- packages/worker/src/tests/api/scim/users.ts | 12 ++---------- 2 files changed, 9 insertions(+), 13 deletions(-) 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 fda5e9d9fc..36259e1427 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 @@ -1,6 +1,10 @@ import tk from "timekeeper" import { mocks, structures } from "@budibase/backend-core/tests" -import { ScimCreateUserRequest, ScimUserResponse } from "@budibase/types" +import { + ScimCreateUserRequest, + ScimUpdateRequest, + ScimUserResponse, +} from "@budibase/types" import { TestConfiguration } from "../../../../../tests" function createScimCreateUserRequest(userData?: { @@ -233,7 +237,7 @@ describe("/api/global/scim/v2/users", () => { describe("PATCH /api/global/scim/v2/users", () => { const patchScimUser = config.api.scimUsersAPI.patch - let user: ScimUser + let user: ScimUserResponse beforeEach(async () => { const body = createScimCreateUserRequest() @@ -278,7 +282,7 @@ describe("/api/global/scim/v2/users", () => { const response = await patchScimUser({ id: user.id, body }) - const expectedScimUser: ScimUser = { + const expectedScimUser: ScimUserResponse = { ...user, userName: newUserName, name: { diff --git a/packages/worker/src/tests/api/scim/users.ts b/packages/worker/src/tests/api/scim/users.ts index f0ebc9e6b6..cac310dcba 100644 --- a/packages/worker/src/tests/api/scim/users.ts +++ b/packages/worker/src/tests/api/scim/users.ts @@ -2,6 +2,7 @@ import { ScimUserListResponse, ScimCreateUserRequest, ScimUserResponse, + ScimUpdateRequest, } from "@budibase/types" import TestConfiguration from "../../TestConfiguration" import { TestAPI } from "../base" @@ -57,15 +58,6 @@ export class ScimUsersAPI extends TestAPI { return res.body as ScimUserResponse } - find = async (id: string, requestSettings?: Partial) => { - const res = await this.#createRequest( - `/api/global/scim/v2/users/${id}`, - "get", - requestSettings - ) - return res.body as ScimUser - } - post = async ( { body, @@ -101,6 +93,6 @@ export class ScimUsersAPI extends TestAPI { body ) - return res.body as ScimUser + return res.body as ScimUserResponse } }