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();