diff --git a/packages/server/src/api/routes/tests/row.spec.ts b/packages/server/src/api/routes/tests/row.spec.ts index ba0afd1fcf..e6be3a5cfc 100644 --- a/packages/server/src/api/routes/tests/row.spec.ts +++ b/packages/server/src/api/routes/tests/row.spec.ts @@ -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) + }) }) })