2019-01-24 08:08:28 +00:00
|
|
|
const app = require('vn-loopback/server/server');
|
2018-07-03 13:00:33 +00:00
|
|
|
|
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() => {
|
2018-07-03 13:00:33 +00:00
|
|
|
let filter = {where: {ticketFk: 1}};
|
2018-08-30 14:15:30 +00:00
|
|
|
let result = await app.models.SaleTracking.listSaleTracking(filter);
|
|
|
|
|
2019-03-27 07:44:15 +00:00
|
|
|
expect(result[0].concept).toEqual('Ranged weapon longbow 2m');
|
2018-07-03 13:00:33 +00:00
|
|
|
});
|
|
|
|
|
2019-01-10 06:26:10 +00:00
|
|
|
it(`should call the listSaleTracking method and return zero if doesn't have lines`, async() => {
|
2018-07-03 13:00:33 +00:00
|
|
|
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);
|
2018-07-03 13:00:33 +00:00
|
|
|
});
|
|
|
|
});
|