refs #6321 test: itemLackDetail

This commit is contained in:
Javier Segarra 2024-04-01 14:05:45 +02:00
parent d225821a41
commit 59498179ec
3 changed files with 9 additions and 3 deletions

View File

@ -1,6 +1,6 @@
const models = require('vn-loopback/server/server').models;
fdescribe('Item Lack', () => {
describe('Item Lack', () => {
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}}};