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