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

18 lines
561 B
JavaScript

const app = require(`${servicesDir}/ticket/server/server`);
describe('ticket getVAT()', () => {
it('should call the getVAT method and return the response', async() => {
await app.models.Ticket.getVAT(1)
.then(response => {
expect(response).toEqual(20.29);
});
});
it(`should call the getVAT method and return zero if doesn't have lines`, async() => {
await app.models.Ticket.getVAT(13)
.then(response => {
expect(response).toEqual(0);
});
});
});