From 03e952c83e8346079e272b2a378741956a61249f Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Mon, 2 Mar 2020 07:57:33 +0100 Subject: [PATCH] Updated unit test --- modules/worker/front/dms/index/index.spec.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/worker/front/dms/index/index.spec.js b/modules/worker/front/dms/index/index.spec.js index a354b74e9..7378ef301 100644 --- a/modules/worker/front/dms/index/index.spec.js +++ b/modules/worker/front/dms/index/index.spec.js @@ -22,15 +22,15 @@ describe('Worker', () => { describe('deleteDms()', () => { it('should make an HTTP Post query', () => { - const dmsId = 4; + const workerDmsId = 1; const dmsIndex = 0; jest.spyOn(controller.vnApp, 'showSuccess'); jest.spyOn(controller.$.model, 'remove'); - controller.workerDms = [{dmsFk: 4}]; + controller.workerDms = [{id: 1, dmsFk: 4}]; controller.dmsIndex = dmsIndex; - $httpBackend.when('POST', `WorkerDms/${dmsId}/removeFile`).respond({}); - $httpBackend.expect('POST', `WorkerDms/${dmsId}/removeFile`); + $httpBackend.when('POST', `WorkerDms/${workerDmsId}/removeFile`).respond({}); + $httpBackend.expect('POST', `WorkerDms/${workerDmsId}/removeFile`); controller.deleteDms('accept'); $httpBackend.flush();