2019-01-24 08:08:28 +00:00
|
|
|
const app = require('vn-loopback/server/server');
|
2018-09-06 14:49:13 +00:00
|
|
|
|
|
|
|
describe('sale getClaimableFromTicket()', () => {
|
2019-01-10 06:26:10 +00:00
|
|
|
it('should return the claimable sales of a given ticket', async() => {
|
2018-09-06 14:49:13 +00:00
|
|
|
let claimableFromTicket = await app.models.Sale.getClaimableFromTicket(16);
|
|
|
|
|
2019-03-27 07:44:15 +00:00
|
|
|
expect(claimableFromTicket[0].concept).toBe('Ranged weapon longbow 2m');
|
2018-10-01 12:57:51 +00:00
|
|
|
expect(claimableFromTicket.length).toBe(3);
|
2018-09-06 14:49:13 +00:00
|
|
|
});
|
|
|
|
});
|