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; const models = require('vn-loopback/server/server').models;
fdescribe('Item Lack', () => { describe('Item Lack', () => {
beforeAll(async() => { beforeAll(async() => {
ctx = { ctx = {
req: { 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 tx = await models.Ticket.beginTransaction({});
const options = {transaction: tx}; const options = {transaction: tx};

View File

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

View File

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