18 lines
570 B
JavaScript
18 lines
570 B
JavaScript
const app = require(`${servicesDir}/ticket/server/server`);
|
|
|
|
describe('sale priceDifference()', () => {
|
|
it('should return ticket price differences', async() => {
|
|
let data = {
|
|
landed: new Date(),
|
|
addressFk: 121,
|
|
agencyModeFk: 1,
|
|
warehouseFk: 1
|
|
};
|
|
let result = await app.models.Sale.priceDifference(1, data);
|
|
|
|
expect(result.totalUnitPrice).toEqual(30.469999999999995);
|
|
expect(result.totalNewPrice).toEqual(26.12);
|
|
expect(result.totalDifference).toEqual(63.8);
|
|
});
|
|
});
|