update today
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2022-01-03 08:38:46 +01:00
parent 5401c1ebf6
commit e8a4a9cd8c
3 changed files with 1066 additions and 114 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -13,6 +13,9 @@ describe('InvoiceOut download()', () => {
}; };
it('should return the downloaded file name', async() => { it('should return the downloaded file name', async() => {
let year = new Date();
year = year.getFullYear();
spyOn(models.InvoiceContainer, 'container').and.returnValue({ spyOn(models.InvoiceContainer, 'container').and.returnValue({
client: {root: '/path'} client: {root: '/path'}
}); });
@ -23,6 +26,6 @@ describe('InvoiceOut download()', () => {
const result = await models.InvoiceOut.download(ctx, invoiceId); const result = await models.InvoiceOut.download(ctx, invoiceId);
expect(result[1]).toEqual('application/pdf'); expect(result[1]).toEqual('application/pdf');
expect(result[2]).toEqual('filename="2021T1111111.pdf"'); expect(result[2]).toEqual(`filename="${year}T1111111.pdf"`);
}); });
}); });