#6321 - Negative tickets #1945

Merged
jsegarra merged 146 commits from 6321_negative_tickets into dev 2025-02-11 08:45:33 +00:00
3 changed files with 9 additions and 3 deletions
Showing only changes of commit 59498179ec - Show all commits

View File

@ -1,6 +1,6 @@
const models = require('vn-loopback/server/server').models;
fdescribe('Item Lack', () => {
describe('Item Lack', () => {
jsegarra marked this conversation as resolved
Review

modules/ticket/back/methods/ticket/specs/closure.spec.js dile a chatgpt que coja este arhcivo como plantilla y cambie el tuyo para dejar los beginTransaction y los rollback en un beforeEach y afterEach

modules/ticket/back/methods/ticket/specs/closure.spec.js dile a chatgpt que coja este arhcivo como plantilla y cambie el tuyo para dejar los beginTransaction y los rollback en un beforeEach y afterEach
beforeAll(async() => {
ctx = {
req: {
@ -134,7 +134,7 @@ fdescribe('Item Lack', () => {
}
});
fit('should return data with filter.lack', async() => {
it('should return data with filter.lack', async() => {
const tx = await models.Ticket.beginTransaction({});
const options = {transaction: tx};

View File

@ -11,7 +11,9 @@ describe('Item Lack Detail', () => {
const result = await models.Ticket.itemLackDetail(id, options);
expect(result).toBeFalsy();
await tx.rollback();
} catch (e) {
await tx.rollback();
throw e;
}
});
@ -25,7 +27,9 @@ describe('Item Lack Detail', () => {
const result = await models.Ticket.itemLackDetail(id, options);
expect(result).toBeFalsy();
await tx.rollback();
} catch (e) {
await tx.rollback();
throw e;
}
});
@ -39,7 +43,9 @@ describe('Item Lack Detail', () => {
const result = await models.Ticket.itemLackDetail(id, options);
expect(result).toBeFalsy();
await tx.rollback();
} catch (e) {
await tx.rollback();
throw e;
}
});

View File

@ -1,6 +1,6 @@
const models = require('vn-loopback/server/server').models;
fdescribe('NegativeOrigin', () => {
describe('NegativeOrigin', () => {
it('should return OK', async() => {
const tx = await models.Ticket.beginTransaction({});
const ctx = {req: {accessToken: {userId: 9}}};