Cleanup tests

This commit is contained in:
Adria Navarro 2024-10-08 17:32:35 +02:00
parent a0d3bf9993
commit 37eb66e0d5
1 changed files with 9 additions and 7 deletions

View File

@ -43,19 +43,12 @@ describe("/permission", () => {
let tableId: string
let row: Row
let view: ViewV2
let perms: Document[]
beforeEach(async () => {
mocks.licenses.useCloudFree()
const table = await config.createTable()
tableId = table._id!
row = await config.createRow()
view = await config.api.viewV2.create({
tableId,
name: generator.guid(),
})
perms = await config.api.permission.add({
roleId: STD_ROLE_ID,
resourceId: tableId,
@ -136,6 +129,15 @@ describe("/permission", () => {
})
describe("check public user allowed", () => {
let view: ViewV2
beforeEach(async () => {
view = await config.api.viewV2.create({
tableId,
name: generator.guid(),
})
})
it("should be able to read the row", async () => {
// replicate changes before checking permissions
await config.publish()