16 lines
448 B
JavaScript
16 lines
448 B
JavaScript
const app = require(`${servicesDir}/ticket/server/server`);
|
|
|
|
describe('ticket getTotal()', () => {
|
|
it('should return the total of a ticket', async() => {
|
|
let result = await app.models.Ticket.getTotal(1);
|
|
|
|
expect(result).toEqual(181.12);
|
|
});
|
|
|
|
it(`should return zero if the ticket doesn't have lines`, async() => {
|
|
let result = await app.models.Ticket.getTotal(13);
|
|
|
|
expect(result).toEqual(0);
|
|
});
|
|
});
|