Adding builder test case.

This commit is contained in:
mike12345567 2023-04-12 20:02:37 +01:00
parent 23e99ca4b7
commit b2d7f24ff3
1 changed files with 12 additions and 2 deletions

View File

@ -38,8 +38,13 @@ beforeAll(async () => {
initUserGroupSync(updateCb)
})
async function createUser(email: string, roles: UserRoles) {
const user = await config.createUser({ email, roles })
async function createUser(email: string, roles: UserRoles, builder?: boolean) {
const user = await config.createUser({
email,
roles,
builder: builder || false,
admin: false,
})
await context.doInContext(config.appId!, async () => {
await events.user.created(user)
})
@ -123,4 +128,9 @@ describe("app user/group sync", () => {
await removeUserFromGroup()
await checkEmail(groupEmail, { notFound: true })
})
it("should be able to handle builder users", async () => {
await createUser("test3@test.com", {}, true)
await checkEmail("test3@test.com")
})
})