Merge branch 'master' into cheeks-fixes
This commit is contained in:
commit
aadb368161
|
@ -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 () => {
|
||||
|
|
|
@ -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
Loading…
Reference in New Issue