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-21 13:01:51 +00:00
|
|
|
expect(response).toEqual(20.29);
|
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);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|