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}}};
|
|
|
|
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');
|
|
|
|
});
|
|
|
|
});
|