18 lines
561 B
JavaScript
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(22.98);
|
|
});
|
|
});
|
|
|
|
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);
|
|
});
|
|
});
|
|
});
|