Merge branch 'master' into cheeks-fixes

This commit is contained in:
Andrew Kingston 2024-06-10 13:47:06 +02:00 committed by GitHub
commit aadb368161
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 19 additions and 1004 deletions

View File

@ -165,8 +165,17 @@ describe("/datasources", () => {
describe("get", () => {
it("should be able to get a datasource", async () => {
const ds = await config.api.datasource.get(datasource._id!)
expect(ds._id).toEqual(datasource._id)
expect(ds._rev).toBeDefined()
expect(ds).toEqual({
config: expect.any(Object),
plus: datasource.plus,
source: datasource.source,
isSQL: true,
type: "datasource_plus",
_id: datasource._id,
_rev: expect.any(String),
createdAt: expect.any(String),
updatedAt: expect.any(String),
})
})
it("should not return database password", async () => {

View File

@ -756,13 +756,16 @@ describe.each([
it("should be able to bulk delete rows, including a row that doesn't exist", async () => {
const createdRow = await config.api.row.save(table._id!, {})
const createdRow2 = await config.api.row.save(table._id!, {})
const res = await config.api.row.bulkDelete(table._id!, {
rows: [createdRow, { _id: "9999999" }],
rows: [createdRow, createdRow2, { _id: "9999999" }],
})
expect(res[0]._id).toEqual(createdRow._id)
expect(res.length).toEqual(1)
expect(res.map(r => r._id)).toEqual(
expect.arrayContaining([createdRow._id, createdRow2._id])
)
expect(res.length).toEqual(2)
})
})

File diff suppressed because it is too large Load Diff