Add views
This commit is contained in:
parent
d1d86b6803
commit
9cf401162b
|
@ -842,7 +842,7 @@ describe("/rows", () => {
|
|||
})
|
||||
})
|
||||
|
||||
it("when schema is defined, no other columns are returnd", async () => {
|
||||
it("when schema is defined, no other columns are returned", async () => {
|
||||
const table = await config.createTable(userTable())
|
||||
const rows = []
|
||||
for (let i = 0; i < 10; i++) {
|
||||
|
@ -865,5 +865,14 @@ describe("/rows", () => {
|
|||
expect.arrayContaining(rows.map(r => ({ name: r.name })))
|
||||
)
|
||||
})
|
||||
|
||||
it("views without data can be returned", async () => {
|
||||
const table = await config.createTable(userTable())
|
||||
|
||||
const createViewResponse = await config.api.viewV2.create()
|
||||
const response = await config.api.viewV2.search(createViewResponse.id)
|
||||
|
||||
expect(response.body.rows).toHaveLength(0)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue