salix/modules/ticket/back/methods/sale-tracking/specs/listSaleTracking.spec.js

18 lines
658 B
JavaScript
Raw Normal View History

2018-12-21 11:50:28 +00:00
const app = require(`${serviceRoot}/server/server`);
2018-10-25 09:49:38 +00:00
describe('ticket listSaleTracking()', () => {
2019-01-10 06:26:10 +00:00
it('should call the listSaleTracking method and return the response', async() => {
let filter = {where: {ticketFk: 1}};
2018-08-30 14:15:30 +00:00
let result = await app.models.SaleTracking.listSaleTracking(filter);
2019-01-10 06:26:10 +00:00
expect(result[0].concept).toEqual('Object1 Gem1 5');
});
2019-01-10 06:26:10 +00:00
it(`should call the listSaleTracking method and return zero if doesn't have lines`, async() => {
let filter = {where: {ticketFk: 2}};
2018-08-30 14:15:30 +00:00
let result = await app.models.SaleTracking.listSaleTracking(filter);
expect(result.length).toEqual(0);
});
});