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