diff --git a/back/methods/docuware/specs/core.spec.js b/back/methods/docuware/specs/core.spec.js index aeffca5b3..a921fdbfe 100644 --- a/back/methods/docuware/specs/core.spec.js +++ b/back/methods/docuware/specs/core.spec.js @@ -1,5 +1,24 @@ const axios = require('axios'); const {Docuware} = require('vn-loopback/server/server').models; +describe('hasDeviceReady()', () => { + it('should return true', async() => { + const result = await Docuware.hasDeviceReady({device: 'Tablet 1'}); + + expect(result).toBeTrue(); + }); + + it('should return false', async() => { + const result = await Docuware.hasDeviceReady({device: null}); + + expect(result).toBeFalse(); + }); + + it('should not exists return false ', async() => { + const result = await Docuware.hasDeviceReady(); + + expect(result).toBeFalse(); + }); +}); describe('Docuware core', () => { beforeAll(() => { @@ -11,26 +30,6 @@ describe('Docuware core', () => { delete process.env.NODE_ENV; }); - describe('hasDeviceReady()', () => { - it('should return true', async() => { - const result = await Docuware.hasDeviceReady({device: 'Tablet 1'}); - - expect(result).toBeTrue(); - }); - - it('should return false', async() => { - const result = await Docuware.hasDeviceReady({device: null}); - - expect(result).toBeFalse(); - }); - - it('should not exists return false ', async() => { - const result = await Docuware.hasDeviceReady(); - - expect(result).toBeFalse(); - }); - }); - describe('getOptions()', () => { it('should return url and headers', async() => { const result = await Docuware.getOptions(); @@ -173,7 +172,7 @@ describe('Docuware core', () => { expect(result.id).toEqual(1); }); - fit('should return data with parse', async() => { + it('should return data with parse', async() => { spyOn(Docuware, 'getFileCabinet').and.returnValue((new Promise(resolve => resolve(Math.random())))); spyOn(Docuware, 'getDialog').and.returnValue((new Promise(resolve => resolve(Math.random())))); const data = {