2019-04-05 11:58:50 +00:00
|
|
|
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.
|
|
|
|
*/
|
2019-04-05 13:20:12 +00:00
|
|
|
describe('sms send()', () => {
|
2019-04-10 08:53:00 +00:00
|
|
|
it('should should return the expected message and status code', async() => {
|
2019-04-05 11:58:50 +00:00
|
|
|
let ctx = {req: {accessToken: {userId: 1}}};
|
2019-04-16 06:21:20 +00:00
|
|
|
let result = await app.models.Sms.send(ctx, 101, 'Invalid', 'My SMS Body');
|
2019-04-05 11:58:50 +00:00
|
|
|
|
|
|
|
expect(result.statusCode).toEqual(200);
|
|
|
|
expect(result.status).toEqual('Envio en procesamiento');
|
|
|
|
});
|
|
|
|
});
|