Adding test with invalid role IDs.#
This commit is contained in:
parent
99d867fe60
commit
f91e039402
|
@ -39,6 +39,16 @@ describe("/roles", () => {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it("handle a role with invalid inherits", async () => {
|
||||||
|
const role = basicRole()
|
||||||
|
role.inherits = ["not_real", "some_other_not_real"]
|
||||||
|
|
||||||
|
const res = await config.api.roles.save(role, {
|
||||||
|
status: 200,
|
||||||
|
})
|
||||||
|
expect(res.inherits).toEqual([BUILTIN_ROLE_IDS.BASIC])
|
||||||
|
})
|
||||||
|
|
||||||
it("handle a role with no inherits", async () => {
|
it("handle a role with no inherits", async () => {
|
||||||
const role = basicRole()
|
const role = basicRole()
|
||||||
role.inherits = []
|
role.inherits = []
|
||||||
|
|
Loading…
Reference in New Issue