test(Salix): refs #6427 #6427 add option parameter

This commit is contained in:
Javier Segarra 2024-06-14 15:54:10 +02:00
parent aa3b58433c
commit 1c093342aa
3 changed files with 12 additions and 3 deletions

View File

@ -3,8 +3,15 @@ const app = require('vn-loopback/server/server');
describe('sms send()', () => {
it('should not return status error', async() => {
const ctx = {req: {accessToken: {userId: 1}}};
const result = await app.models.Sms.send(ctx, '123456789', 'My SMS Body');
const result = await app.models.Sms.send(ctx, '123456789', 'My SMS Body', {insert: true});
expect(result.status).toBeUndefined();
});
it('should not insert', async() => {
const ctx = {req: {accessToken: {userId: 1}}};
const result = await app.models.Sms.send(ctx, '123456789', 'My SMS Body', {insert: false});
expect(result).toBeUndefined();
});
});

View File

@ -1,2 +1,4 @@
-- Place your SQL code here
#6427 -- Place your SQL code here
ALTER TABLE account.`user` ADD recoveryPhone varchar(20) NULL;
-- ALTER TABLE vn.`sms` MODIFY COLUMN senderFk int(10) unsigned NULL;

View File

@ -1,7 +1,7 @@
import selectors from '../../helpers/selectors';
import getBrowser from '../../helpers/puppeteer';
fdescribe('RecoverPassword path', async() => {
describe('RecoverPassword path', async() => {
let browser;
let page;