salix/services/loopback/common/methods/ticket/specs/getSales.spec.js

12 lines
361 B
JavaScript
Raw Normal View History

const app = require(`${servicesDir}/ticket/server/server`);
describe('ticket getSales()', () => {
it('should return the sales of a ticket', async() => {
let sales = await app.models.Ticket.getSales(1);
expect(sales.length).toBe(4);
expect(sales[0].item).toBeDefined();
expect(sales[0].item.tags).toBeDefined();
});
});