Adding builder test case.
This commit is contained in:
parent
23e99ca4b7
commit
b2d7f24ff3
|
@ -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")
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue