Fix merge conflicts

This commit is contained in:
adrinr 2023-03-14 15:00:02 +01:00
parent 829aee1f68
commit f8959aacb0
2 changed files with 3 additions and 25 deletions

View File

@ -301,7 +301,7 @@ describe("/api/global/scim/v2/users", () => {
describe("DELETE /api/global/scim/v2/users/:id", () => {
const deleteScimUser = config.api.scimUsersAPI.delete
let user: ScimUser
let user: ScimUserResponse
beforeEach(async () => {
const body = createScimCreateUserRequest()

View File

@ -26,9 +26,7 @@ export class ScimUsersAPI extends TestAPI {
body?: object
) => {
const { expect, setHeaders } = { ...defaultConfig, ...requestSettings }
let request =
this.request[method](url)
.expect(expect)
let request = this.request[method](url).expect(expect)
if (method !== "delete") {
request = request.expect("Content-Type", /json/)
@ -100,32 +98,12 @@ export class ScimUsersAPI extends TestAPI {
return res.body as ScimUserResponse
}
patch = async (
{
id,
body,
}: {
id: string
body: ScimUpdateRequest
},
requestSettings?: Partial<RequestSettings>
) => {
const res = await this.#createRequest(
`/api/global/scim/v2/users/${id}`,
"patch",
requestSettings,
body
)
return res.body as ScimUser
}
delete = async (id: string, requestSettings?: Partial<RequestSettings>) => {
const res = await this.#createRequest(
`/api/global/scim/v2/users/${id}`,
"delete",
requestSettings
)
return res.body as ScimUser
return res.body as ScimUserResponse
}
}