update today
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
5401c1ebf6
commit
e8a4a9cd8c
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
@ -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"`);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue