Dry tests
This commit is contained in:
parent
7bfdd31daa
commit
25276bafb2
|
@ -299,10 +299,6 @@ describe("/api/global/scim/v2/groups", () => {
|
||||||
const expectedScimGroup = {
|
const expectedScimGroup = {
|
||||||
...group,
|
...group,
|
||||||
displayName: newDisplayName,
|
displayName: newDisplayName,
|
||||||
meta: {
|
|
||||||
...group.meta,
|
|
||||||
lastModified: mockedTime.toISOString(),
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
expect(response).toEqual(expectedScimGroup)
|
expect(response).toEqual(expectedScimGroup)
|
||||||
|
|
||||||
|
@ -516,10 +512,6 @@ describe("/api/global/scim/v2/groups", () => {
|
||||||
const expectedScimGroup: ScimGroupResponse = {
|
const expectedScimGroup: ScimGroupResponse = {
|
||||||
...group,
|
...group,
|
||||||
displayName: newDisplayName,
|
displayName: newDisplayName,
|
||||||
meta: {
|
|
||||||
...group.meta,
|
|
||||||
lastModified: mockedTime.toISOString() as any,
|
|
||||||
},
|
|
||||||
members: expect.arrayContaining([
|
members: expect.arrayContaining([
|
||||||
{
|
{
|
||||||
value: users[3].id,
|
value: users[3].id,
|
||||||
|
|
|
@ -1,17 +1,13 @@
|
||||||
import tk from "timekeeper"
|
import tk from "timekeeper"
|
||||||
import _ from "lodash"
|
import _ from "lodash"
|
||||||
import { mocks, structures } from "@budibase/backend-core/tests"
|
import { mocks, structures } from "@budibase/backend-core/tests"
|
||||||
import {
|
import { ScimUpdateRequest, ScimUserResponse } from "@budibase/types"
|
||||||
ScimCreateUserRequest,
|
|
||||||
ScimUpdateRequest,
|
|
||||||
ScimUserResponse,
|
|
||||||
} from "@budibase/types"
|
|
||||||
import { TestConfiguration } from "../../../../../tests"
|
import { TestConfiguration } from "../../../../../tests"
|
||||||
|
|
||||||
mocks.licenses.useScimIntegration()
|
mocks.licenses.useScimIntegration()
|
||||||
|
|
||||||
describe("/api/global/scim/v2/users", () => {
|
describe("/api/global/scim/v2/users", () => {
|
||||||
let mockedTime = new Date(structures.generator.timestamp())
|
let mockedTime: Date
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
tk.reset()
|
tk.reset()
|
||||||
|
|
Loading…
Reference in New Issue