Reduce reliance on config a bit more.

This commit is contained in:
Sam Rose 2024-03-13 16:44:05 +00:00
parent 68777b0843
commit 76ecfedaed
No known key found for this signature in database
1 changed files with 12 additions and 2 deletions

View File

@ -832,9 +832,19 @@ describe.each([
})
it("should allow enriching attachment rows", async () => {
const table = await config.createAttachmentTable()
const table = await config.api.table.save(
defaultTable({
schema: {
attachment: {
type: FieldType.ATTACHMENT,
name: "attachment",
constraints: { type: "array", presence: false },
},
},
})
)
const attachmentId = `${uuid.v4()}.csv`
const row = await config.createRow({
const row = await config.api.row.save(table._id!, {
name: "test",
description: "test",
attachment: [