18 lines
556 B
JavaScript
18 lines
556 B
JavaScript
|
const app = require(`${servicesDir}/order/server/server`);
|
||
|
|
||
|
describe('order getVAT()', () => {
|
||
|
it('should call the getVAT method and return the response', async() => {
|
||
|
await app.models.Order.getVAT(1)
|
||
|
.then(response => {
|
||
|
expect(response).toEqual(9.49);
|
||
|
});
|
||
|
});
|
||
|
|
||
|
it(`should call the getVAT method and return zero if doesn't have lines`, async() => {
|
||
|
await app.models.Order.getVAT(13)
|
||
|
.then(response => {
|
||
|
expect(response).toEqual(0);
|
||
|
});
|
||
|
});
|
||
|
});
|