Add users with all roles
This commit is contained in:
parent
b9186cac9d
commit
1c0767f549
|
@ -63,8 +63,9 @@ export default class UserManagementApi {
|
|||
const response = await this.api.post(`/global/users/multi/invite`, { body })
|
||||
const json = await response.json()
|
||||
expect(response).toHaveStatusCode(200)
|
||||
expect(json.created.successful.length).toEqual(body.length)
|
||||
expect(json.created.unsuccessful.length).toEqual(0)
|
||||
expect(json.unsuccessful.length).toEqual(0)
|
||||
expect(json.successful.length).toEqual(body.length)
|
||||
|
||||
return [response, json]
|
||||
}
|
||||
|
||||
|
|
|
@ -65,12 +65,6 @@ export const generateInviteUser = (): Object[] => {
|
|||
return [{
|
||||
email: `pedro+${randomId}@budibase.com`,
|
||||
userInfo: {
|
||||
admin: {
|
||||
global: true
|
||||
},
|
||||
builder: {
|
||||
global: true
|
||||
},
|
||||
userGroups: []
|
||||
}
|
||||
}]
|
||||
|
|
|
@ -26,7 +26,7 @@ describe("Internal API - User Management & Permissions", () => {
|
|||
const [devResponse, devData] = await config.userManagement.addUsers(generateDeveloper())
|
||||
const [userResponse, userData] = await config.userManagement.addUsers(generateAppUser())
|
||||
|
||||
const [invitedUserResponse, invitedUserData] = await config.userManagement.addUsers(generateInviteUser())
|
||||
const [invitedUserResponse, invitedUserData] = await config.userManagement.inviteUser(generateInviteUser())
|
||||
|
||||
const [allUsersResponse, allUsersData] = await config.userManagement.getAllUsers()
|
||||
expect(allUsersData.length).toEqual(4)
|
||||
|
|
Loading…
Reference in New Issue