Cleanup tests
This commit is contained in:
parent
a0d3bf9993
commit
37eb66e0d5
|
@ -43,19 +43,12 @@ describe("/permission", () => {
|
||||||
|
|
||||||
let tableId: string
|
let tableId: string
|
||||||
let row: Row
|
let row: Row
|
||||||
let view: ViewV2
|
|
||||||
let perms: Document[]
|
let perms: Document[]
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
mocks.licenses.useCloudFree()
|
|
||||||
|
|
||||||
const table = await config.createTable()
|
const table = await config.createTable()
|
||||||
tableId = table._id!
|
tableId = table._id!
|
||||||
row = await config.createRow()
|
row = await config.createRow()
|
||||||
view = await config.api.viewV2.create({
|
|
||||||
tableId,
|
|
||||||
name: generator.guid(),
|
|
||||||
})
|
|
||||||
perms = await config.api.permission.add({
|
perms = await config.api.permission.add({
|
||||||
roleId: STD_ROLE_ID,
|
roleId: STD_ROLE_ID,
|
||||||
resourceId: tableId,
|
resourceId: tableId,
|
||||||
|
@ -136,6 +129,15 @@ describe("/permission", () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
describe("check public user allowed", () => {
|
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 () => {
|
it("should be able to read the row", async () => {
|
||||||
// replicate changes before checking permissions
|
// replicate changes before checking permissions
|
||||||
await config.publish()
|
await config.publish()
|
||||||
|
|
Loading…
Reference in New Issue