diff --git a/modules/client/back/methods/sms/specs/send.spec.js b/modules/client/back/methods/sms/specs/send.spec.js index 0045b148a..475e9fc1c 100644 --- a/modules/client/back/methods/sms/specs/send.spec.js +++ b/modules/client/back/methods/sms/specs/send.spec.js @@ -8,7 +8,7 @@ const app = require('vn-loopback/server/server'); describe('sms send()', () => { it('should should return the expected message and status code', async() => { let ctx = {req: {accessToken: {userId: 1}}}; - let result = await app.models.Sms.send(ctx, null, 'Invalid', 'My SMS Body'); + let result = await app.models.Sms.send(ctx, 101, 'Invalid', 'My SMS Body'); expect(result.statusCode).toEqual(200); expect(result.status).toEqual('Envio en procesamiento'); diff --git a/modules/client/front/sms/index.spec.js b/modules/client/front/sms/index.spec.js index e8f530025..a1f18c23f 100644 --- a/modules/client/front/sms/index.spec.js +++ b/modules/client/front/sms/index.spec.js @@ -17,8 +17,8 @@ describe('Client', () => { describe('onResponse()', () => { it('should perform a POST query and show a success snackbar', () => { - let params = {recipient: 111111111, message: 'My SMS'}; - controller.sms = {recipient: 111111111, message: 'My SMS'}; + let params = {destinationFk: 101, destination: 111111111, message: 'My SMS'}; + controller.sms = {destinationFk: 101, destination: 111111111, message: 'My SMS'}; spyOn(controller.vnApp, 'showMessage'); $httpBackend.when('POST', `/client/api/Sms/send`, params).respond(200, params); diff --git a/modules/ticket/front/sale/index.spec.js b/modules/ticket/front/sale/index.spec.js index 113e29c80..23bc4b809 100644 --- a/modules/ticket/front/sale/index.spec.js +++ b/modules/ticket/front/sale/index.spec.js @@ -180,7 +180,7 @@ describe('Ticket', () => { controller.showSMSDialog(); expect(controller.$scope.sms.open).toHaveBeenCalledWith(); - expect(controller.newSMS.recipient).toEqual(111111111); + expect(controller.newSMS.destination).toEqual(111111111); expect(controller.newSMS.message).not.toEqual(''); }); });