fix: refs #7965 filter and sales back tests
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jon Elias 2024-11-29 12:47:24 +01:00
parent 568661021a
commit 8fedd78938
3 changed files with 6 additions and 7 deletions

View File

@ -80,11 +80,11 @@ describe('ticket filter()', () => {
const result = await models.Ticket.filter(ctx, filter, options); const result = await models.Ticket.filter(ctx, filter, options);
result.forEach(ticket => { result.forEach(ticket => {
expect(ticket.isFreezed).toEqual(null); expect(ticket.isFreezed).toEqual(0);
expect(ticket.hasRisk).toEqual(null); expect(ticket.hasRisk).toEqual(0);
expect(ticket.hasTicketRequest).toEqual(null); expect(ticket.hasTicketRequest).toEqual(0);
expect(ticket.hasItemShortage).toEqual(null); expect(ticket.hasItemShortage).toEqual(0);
expect(ticket.hasRounding).toEqual(null); expect(ticket.hasRounding).toEqual(0);
}); });
await tx.rollback(); await tx.rollback();

View File

@ -15,7 +15,6 @@ describe('ticket getSales()', () => {
expect(sales[1].item).toBeDefined(); expect(sales[1].item).toBeDefined();
expect(sales[2].item).toBeDefined(); expect(sales[2].item).toBeDefined();
expect(sales[3].item).toBeDefined(); expect(sales[3].item).toBeDefined();
expect(sales[0].claim).toBeDefined();
await tx.rollback(); await tx.rollback();
} catch (e) { } catch (e) {

View File

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