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-07-02 06:18:54 +00:00
|
|
|
expect(response).toEqual(58.75);
|
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);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|