test(ticket_basci-data_step-two): back and front
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
7b13c6a9cb
commit
87f994aa77
|
@ -80,10 +80,11 @@ describe('sale priceDifference()', () => {
|
|||
};
|
||||
|
||||
const result = await models.Ticket.priceDifference(ctx, options);
|
||||
console.log(result.items[0]);
|
||||
const firstItem = result.items[0];
|
||||
const secondtItem = result.items[1];
|
||||
|
||||
expect(result.totalUnitPrice).toEqual(result.totalNewPrice);
|
||||
expect(result.totalDifference).toEqual(0);
|
||||
expect(firstItem.visible).toEqual(445);
|
||||
expect(secondtItem.visible).toEqual(1980);
|
||||
|
||||
await tx.rollback();
|
||||
} catch (e) {
|
||||
|
|
|
@ -64,5 +64,22 @@ describe('Ticket', () => {
|
|||
expect(controller.totalPriceDifference).toEqual(0.3);
|
||||
});
|
||||
});
|
||||
|
||||
fdescribe('ticketHaveNegatives()', () => {
|
||||
it('should show if ticket have any negative', () => {
|
||||
controller.ticket = {
|
||||
sale: {
|
||||
items: [{
|
||||
quantity: 2,
|
||||
visible: 1
|
||||
}]
|
||||
}
|
||||
};
|
||||
|
||||
controller.ticketHaveNegatives();
|
||||
|
||||
expect(controller.haveNegatives).toEqual(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue