salix/services/loopback/common/methods/ticket/specs/get-VAT.spec.js

20 lines
591 B
JavaScript
Raw Normal View History

2018-06-19 10:10:38 +00:00
const app = require(`${servicesDir}/ticket/server/server`);
describe('ticket getVAT()', () => {
it('should call the getVAT method and return the response', done => {
app.models.Ticket.getVAT(1)
.then(response => {
expect(response).toEqual(40.55);
2018-06-19 10:10:38 +00:00
done();
});
});
it(`should call the getVAT method and return zero if doesn't have lines`, done => {
app.models.Ticket.getVAT(13)
.then(response => {
expect(response).toEqual(0);
done();
});
});
});