Fixing test case.
This commit is contained in:
parent
2472168477
commit
0a73ab83db
|
@ -216,13 +216,10 @@ exports.testPermissionsForEndpoint = async ({
|
|||
url,
|
||||
body,
|
||||
appId,
|
||||
permissionName,
|
||||
permName1,
|
||||
permName2,
|
||||
}) => {
|
||||
const headers = await createUserWithOnePermission(
|
||||
request,
|
||||
appId,
|
||||
permissionName
|
||||
)
|
||||
const headers = await createUserWithOnePermission(request, appId, permName1)
|
||||
|
||||
await createRequest(request, method, url, body)
|
||||
.set(headers)
|
||||
|
@ -231,7 +228,7 @@ exports.testPermissionsForEndpoint = async ({
|
|||
const noPermsHeaders = await createUserWithAllPermissionExceptOne(
|
||||
request,
|
||||
appId,
|
||||
permissionName
|
||||
permName2
|
||||
)
|
||||
|
||||
await createRequest(request, method, url, body)
|
||||
|
|
|
@ -54,7 +54,8 @@ describe("/users", () => {
|
|||
method: "GET",
|
||||
url: `/api/users`,
|
||||
appId: appId,
|
||||
permissionName: BUILTIN_PERMISSION_NAMES.WRITE,
|
||||
permName1: BUILTIN_PERMISSION_NAMES.POWER,
|
||||
permName2: BUILTIN_PERMISSION_NAMES.WRITE,
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -81,7 +82,8 @@ describe("/users", () => {
|
|||
body: { name: "brandNewUser", username: "brandNewUser", password: "yeeooo", accessLevelId: BUILTIN_LEVELS.power._id },
|
||||
url: `/api/users`,
|
||||
appId: appId,
|
||||
permissionName: BUILTIN_PERMISSION_NAMES.WRITE,
|
||||
permName1: BUILTIN_PERMISSION_NAMES.ADMIN,
|
||||
permName2: BUILTIN_PERMISSION_NAMES.POWER,
|
||||
})
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue