20 lines
602 B
JavaScript
20 lines
602 B
JavaScript
const app = require(`${servicesDir}/ticket/server/server`);
|
|
|
|
describe('ticket getTotal()', () => {
|
|
it('should call the getTotal method and return the response', done => {
|
|
app.models.Ticket.getTotal(1)
|
|
.then(response => {
|
|
expect(response).toEqual(325.05);
|
|
done();
|
|
});
|
|
});
|
|
|
|
it(`should call the getTotal method and return zero if doesn't have lines`, done => {
|
|
app.models.Ticket.getTotal(13)
|
|
.then(response => {
|
|
expect(response).toEqual(0);
|
|
done();
|
|
});
|
|
});
|
|
});
|