Fix tests

This commit is contained in:
Adria Navarro 2023-09-25 09:48:27 +02:00
parent aee590bbba
commit 2530ebda2b
1 changed files with 2 additions and 3 deletions

View File

@ -10,14 +10,13 @@ import { authDetails } from "./sso"
import { uuid } from "./common" import { uuid } from "./common"
import { generator } from "./generator" import { generator } from "./generator"
import { tenant } from "." import { tenant } from "."
import { generateGlobalUserID } from "../../../../src/docIds"
export const newEmail = () => { export const newEmail = () => {
return `${uuid()}@test.com` return `${uuid()}@test.com`
} }
export const user = (userProps?: Partial<Omit<User, "userId">>): User => { export const user = (userProps?: Partial<Omit<User, "userId">>): User => {
const userId = userProps?._id || generateGlobalUserID() const userId = userProps?._id
return { return {
_id: userId, _id: userId,
userId, userId,
@ -53,7 +52,7 @@ export const adminOnlyUser = (userProps?: any): AdminOnlyUser => {
} }
} }
export const builderUser = (userProps?: any): BuilderUser => { export const builderUser = (userProps?: Partial<User>): BuilderUser => {
return { return {
...user(userProps), ...user(userProps),
builder: { builder: {