Add failing test
This commit is contained in:
parent
5f563a9b93
commit
0420734d97
|
@ -115,4 +115,17 @@ describe("attachment cleanup", () => {
|
|||
await AttachmentCleanup.rowUpdate(table(), { row: row(), oldRow: row() })
|
||||
expect(mockedDeleteFiles).not.toBeCalled()
|
||||
})
|
||||
|
||||
it("should be able to cleanup a column and not throw when attachments are undefined", async () => {
|
||||
const originalTable = table()
|
||||
delete originalTable.schema["attach"]
|
||||
await AttachmentCleanup.tableUpdate(
|
||||
originalTable,
|
||||
[{ attach: undefined }],
|
||||
{
|
||||
oldTable: table(),
|
||||
}
|
||||
)
|
||||
expect(mockedDeleteFiles).not.toBeCalled()
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue