1
0
Fork 0
mirror of synced 2024-05-16 18:33:53 +12:00
budibase/qa-core/src/account-api/fixtures/accounts.ts
Rory Powell f656e97d2d Lint
2023-07-25 11:28:14 +01:00

25 lines
583 B
TypeScript

import { generator } from "../../shared"
import { Hosting, CreateAccountRequest } from "@budibase/types"
// TODO: Refactor me to central location
export const generateAccount = (
partial: Partial<CreateAccountRequest>
): CreateAccountRequest => {
const uuid = generator.guid()
const email = `${uuid}@budibase.com`
const tenant = `tenant${uuid.replace(/-/g, "")}`
return {
email,
hosting: Hosting.CLOUD,
name: email,
password: uuid,
profession: "software_engineer",
size: "10+",
tenantId: tenant,
tenantName: tenant,
...partial,
}
}