From 0c9b4bbe874973fc4fd4938bd083733136142fff Mon Sep 17 00:00:00 2001 From: Carlos Jimenez Ruiz Date: Tue, 11 Jun 2019 07:06:49 +0200 Subject: [PATCH] #1436 unitarios back invoiceOut/download --- .../back/methods/invoiceOut/specs/download.spec.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 modules/invoiceOut/back/methods/invoiceOut/specs/download.spec.js 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"'); + }); +});