Use generic mock dates

This commit is contained in:
adrinr 2023-03-20 16:11:39 +00:00
parent 8f3488707b
commit 5dbbdf3f82
1 changed files with 4 additions and 5 deletions

View File

@ -30,12 +30,8 @@ function createScimCreateGroupRequest(groupData?: {
} }
describe("/api/global/scim/v2/groups", () => { describe("/api/global/scim/v2/groups", () => {
let mockedTime = new Date(structures.generator.timestamp())
beforeEach(() => { beforeEach(() => {
tk.reset() tk.freeze(mocks.date.MOCK_DATE)
mockedTime = new Date(structures.generator.timestamp())
tk.freeze(mockedTime)
mocks.licenses.useScimIntegration() mocks.licenses.useScimIntegration()
}) })
@ -149,6 +145,9 @@ describe("/api/global/scim/v2/groups", () => {
describe("no groups exist", () => { describe("no groups exist", () => {
it("a new group can be created and persisted", async () => { it("a new group can be created and persisted", async () => {
const mockedTime = new Date(structures.generator.timestamp())
tk.freeze(mockedTime)
const groupData = { const groupData = {
externalId: structures.uuid(), externalId: structures.uuid(),
displayName: structures.generator.word(), displayName: structures.generator.word(),