2018-04-19 09:20:41 +00:00
|
|
|
const app = require(`${servicesDir}/client/server/server`);
|
2018-04-16 09:21:13 +00:00
|
|
|
|
|
|
|
describe('client getAverageInvoiced()', () => {
|
|
|
|
it('should call the getAverageInvoiced method', done => {
|
2018-04-19 09:20:41 +00:00
|
|
|
app.models.Client.getAverageInvoiced(101)
|
2018-04-16 09:21:13 +00:00
|
|
|
.then(response => {
|
2018-04-18 11:40:09 +00:00
|
|
|
expect(response.invoiced).toEqual(1500);
|
2018-04-16 09:21:13 +00:00
|
|
|
done();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|