6956-2410_devTest #2112

Merged
alexm merged 150 commits from 6956-2410_devTest into test 2024-02-29 09:17:58 +00:00
1 changed files with 15 additions and 4 deletions
Showing only changes of commit ec9e1e6d43 - Show all commits

View File

@ -12,7 +12,7 @@ fdescribe('Value is not', () => {
}
};
it('UpdateFiscalData endpoint', () => {
fit('UpdateFiscalData endpoint', () => {
let messageError = 'Value is not number';
const tag = 'provinceFk';
try {
@ -20,7 +20,7 @@ fdescribe('Value is not', () => {
expect(valueIsNot.message(i18n, tag)).toEqual('El campo \'Provincia\' no es válido');
const data = {
method: 'POST',
originalUrl: 'updateFiscalData',
originalUrl: '/api/updateFiscalData',
body: {
[tag]: null
}
@ -34,11 +34,22 @@ fdescribe('Value is not', () => {
});
describe('OsTicket', () => {
let messageError = 'Value is not number';
let messageError = 'Value is not object';
const tag = 'additionalData';
it('sendToSupport endpoint', () => {
try {
expect(valueIsNot.validation(messageError)).toBeTrue();
expect(valueIsNot.message(ctx, 'provinceFk')).toEqual('El campo "Provincia" no es válido');
expect(valueIsNot.message(i18n, tag)).toEqual(`El campo '${tag}' no es válido`);
const data = {
method: 'POST',
originalUrl: '/api/OsTickets/send-to-support?access_token=DEFAULT_TOKEN',
body: {
[tag]: '{ \'foo\': 42 }'
}
};
const result = valueIsNot.handleError(data);
expect(result).toEqual(tag);
} catch (error) {
expect(error).toBeDefined();
}