1
0
Fork 0
mirror of synced 2024-07-13 02:05:54 +12:00

Merge pull request #13895 from Budibase/slim-down-postgres-spec

Slim down postgres.spec.ts, most of its content is tested elsewhere now across many datasources.
This commit is contained in:
Sam Rose 2024-06-10 11:35:05 +01:00 committed by GitHub
commit 9e3f476c65
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