salix/services/ticket/common/methods/sale-tracking/specs/listSaleTracking.spec.js

18 lines
663 B
JavaScript
Raw Normal View History

const app = require(`${servicesDir}/ticket/server/server`);
2018-10-08 12:35:36 +00:00
xdescribe('ticket listSaleTracking()', () => {
2018-08-30 14:15:30 +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);
expect(result[0].concept).toEqual('Gem of Time');
});
2018-08-30 14:15:30 +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);
});
});