Fix tests.
This commit is contained in:
parent
f876c5c6e4
commit
f5f81a5fb0
|
@ -93,7 +93,7 @@ describe("/roles", () => {
|
|||
|
||||
it("should be able to get the role with a permission added", async () => {
|
||||
const table = await config.createTable()
|
||||
await config.api.permission.set({
|
||||
await config.api.permission.add({
|
||||
roleId: BUILTIN_ROLE_IDS.POWER,
|
||||
resourceId: table._id,
|
||||
level: PermissionLevel.READ,
|
||||
|
|
|
@ -92,7 +92,7 @@ export abstract class TestAPI {
|
|||
const expectHeaders = expectations?.headers || {}
|
||||
|
||||
if (status !== 204 && !expectHeaders["Content-Type"]) {
|
||||
expectHeaders["Content-Type"] = "application/json"
|
||||
expectHeaders["Content-Type"] = /^application\/json/
|
||||
}
|
||||
|
||||
let queryParams = []
|
||||
|
|
Loading…
Reference in New Issue