added sms back unit test
gitea/salix/dev There was a failure building this commit Details

This commit is contained in:
Joan Sanchez 2019-04-05 13:58:50 +02:00
parent ebe269f41e
commit c312374c3e
1 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,16 @@
const app = require('vn-loopback/server/server');
/**
* ¡Importante!
* Envio SMS de prueba a servicio real Masmovil. No llega a enviarse
* por destinatario inválido, pero puede llegar a fallar.
*/
fdescribe('sms send()', () => {
it('should call the send method', async() => {
let ctx = {req: {accessToken: {userId: 1}}};
let result = await app.models.Sms.send(ctx, null, 'Invalid', 'My SMS Body');
expect(result.statusCode).toEqual(200);
expect(result.status).toEqual('Envio en procesamiento');
});
});