@budibase/worker 2.4.44-alpha.10 → 2.4.44-alpha.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@budibase/worker",
3
3
  "email": "hi@budibase.com",
4
- "version": "2.4.44-alpha.10",
4
+ "version": "2.4.44-alpha.11",
5
5
  "description": "Budibase background service",
6
6
  "main": "src/index.ts",
7
7
  "repository": {
@@ -37,10 +37,10 @@
37
37
  "author": "Budibase",
38
38
  "license": "GPL-3.0",
39
39
  "dependencies": {
40
- "@budibase/backend-core": "2.4.44-alpha.10",
41
- "@budibase/pro": "2.4.44-alpha.9",
42
- "@budibase/string-templates": "2.4.44-alpha.10",
43
- "@budibase/types": "2.4.44-alpha.10",
40
+ "@budibase/backend-core": "2.4.44-alpha.11",
41
+ "@budibase/pro": "2.4.44-alpha.10",
42
+ "@budibase/string-templates": "2.4.44-alpha.11",
43
+ "@budibase/types": "2.4.44-alpha.11",
44
44
  "@koa/router": "8.0.8",
45
45
  "@sentry/node": "6.17.7",
46
46
  "@techpass/passport-openidconnect": "0.3.2",
@@ -102,5 +102,5 @@
102
102
  "typescript": "4.7.3",
103
103
  "update-dotenv": "1.1.1"
104
104
  },
105
- "gitHead": "e1b120d9f0399e668c5870e612652a7bc684f47d"
105
+ "gitHead": "4648691c554058fff87d93c1c02cce7fc8263a38"
106
106
  }
@@ -399,53 +399,19 @@ describe("scim", () => {
399
399
  })
400
400
 
401
401
  it.each([false, "false", "False"])(
402
- "can deactive an active user (sending %s)",
402
+ "deactivating an active user (sending %s) will delete it",
403
403
  async activeValue => {
404
404
  const body: ScimUpdateRequest = {
405
405
  schemas: ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
406
406
  Operations: [{ op: "Replace", path: "active", value: activeValue }],
407
407
  }
408
408
 
409
- const response = await patchScimUser({ id: user.id, body })
410
-
411
- const expectedScimUser: ScimUserResponse = {
412
- ...user,
413
- active: false,
414
- }
415
- expect(response).toEqual(expectedScimUser)
416
-
417
- const persistedUser = await config.api.scimUsersAPI.find(user.id)
418
- expect(persistedUser).toEqual(expectedScimUser)
419
- }
420
- )
421
-
422
- it.each([true, "true", "True"])(
423
- "can activate an inactive user (sending %s)",
424
- async activeValue => {
425
- // Deactivate user
426
- await patchScimUser({
427
- id: user.id,
428
- body: {
429
- schemas: ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
430
- Operations: [{ op: "Replace", path: "active", value: true }],
431
- },
432
- })
433
-
434
- const body: ScimUpdateRequest = {
435
- schemas: ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
436
- Operations: [{ op: "Replace", path: "active", value: activeValue }],
437
- }
438
-
439
- const response = await patchScimUser({ id: user.id, body })
440
-
441
- const expectedScimUser: ScimUserResponse = {
442
- ...user,
443
- active: true,
444
- }
445
- expect(response).toEqual(expectedScimUser)
409
+ await patchScimUser(
410
+ { id: user.id, body },
411
+ { expect: 204, skipContentTypeCheck: true }
412
+ )
446
413
 
447
- const persistedUser = await config.api.scimUsersAPI.find(user.id)
448
- expect(persistedUser).toEqual(expectedScimUser)
414
+ await config.api.scimUsersAPI.find(user.id, { expect: 404 })
449
415
  }
450
416
  )
451
417
 
@@ -4,6 +4,7 @@ import { TestAPI } from "../base"
4
4
  const defaultConfig = {
5
5
  expect: 200,
6
6
  setHeaders: true,
7
+ skipContentTypeCheck: false,
7
8
  }
8
9
 
9
10
  export type RequestSettings = typeof defaultConfig
@@ -27,7 +28,7 @@ export abstract class ScimTestAPI extends TestAPI {
27
28
  "application/scim+json; charset=utf-8"
28
29
  )
29
30
 
30
- if (method !== "delete") {
31
+ if (method !== "delete" && !requestSettings?.skipContentTypeCheck) {
31
32
  request = request.expect("Content-Type", /json/)
32
33
  }
33
34