diff --git a/modules/invoiceOut/back/methods/invoiceOut/specs/download.spec.js b/modules/invoiceOut/back/methods/invoiceOut/specs/download.spec.js new file mode 100644 index 000000000..09289896f --- /dev/null +++ b/modules/invoiceOut/back/methods/invoiceOut/specs/download.spec.js @@ -0,0 +1,10 @@ +const app = require('vn-loopback/server/server'); + +describe('InvoiceOut download()', () => { + it('should return the downloaded fine name', async() => { + let result = await app.models.InvoiceOut.download(1); + + expect(result[1]).toEqual('text/plain'); + expect(result[2]).toEqual('filename="README.md"'); + }); +});