Removing duplicate test case.
This commit is contained in:
parent
8f8843aece
commit
f87974caf1
|
@ -125,35 +125,4 @@ describe("syncGlobalUsers", () => {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
it("app users are removed when app is removed from user group", async () => {
|
|
||||||
await config.doInTenant(async () => {
|
|
||||||
const group = await proSdk.groups.save(structures.userGroups.userGroup())
|
|
||||||
const user1 = await config.createUser({ admin: false, builder: false })
|
|
||||||
const user2 = await config.createUser({ admin: false, builder: false })
|
|
||||||
await proSdk.groups.updateGroupApps(group.id, {
|
|
||||||
appsToAdd: [
|
|
||||||
{ appId: config.prodAppId!, roleId: roles.BUILTIN_ROLE_IDS.BASIC },
|
|
||||||
],
|
|
||||||
})
|
|
||||||
await proSdk.groups.addUsers(group.id, [user1._id, user2._id])
|
|
||||||
|
|
||||||
await config.doInContext(config.appId, async () => {
|
|
||||||
await syncGlobalUsers()
|
|
||||||
expect(await rawUserMetadata()).toHaveLength(3)
|
|
||||||
|
|
||||||
await proSdk.groups.removeUsers(group.id, [user1._id])
|
|
||||||
await syncGlobalUsers()
|
|
||||||
|
|
||||||
const metadata = await rawUserMetadata()
|
|
||||||
expect(metadata).toHaveLength(2)
|
|
||||||
|
|
||||||
expect(metadata).not.toContainEqual(
|
|
||||||
expect.objectContaining({
|
|
||||||
_id: db.generateUserMetadataID(user1._id),
|
|
||||||
})
|
|
||||||
)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue