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-06-12 09:38:31 +00:00
|
|
|
it('should return the expected message and status code', async() => {
|
2019-04-05 11:58:50 +00:00
|
|
|
let ctx = {req: {accessToken: {userId: 1}}};
|
2019-06-12 09:38:31 +00:00
|
|
|
let result = await app.models.Sms.send(ctx, 105, 'Invalid', 'My SMS Body');
|
2019-04-05 11:58:50 +00:00
|
|
|
|
|
|
|
expect(result.statusCode).toEqual(200);
|
|
|
|
expect(result.status).toEqual('Envio en procesamiento');
|
|
|
|
});
|
|
|
|
});
|