1
0
Fork 0
mirror of synced 2024-10-02 10:08:09 +13:00

Add failing test

This commit is contained in:
Adria Navarro 2024-03-13 16:48:32 +01:00
parent 5f563a9b93
commit 0420734d97

View file

@ -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()
})
})