2018-04-16 09:21:13 +00:00
|
|
|
const getAverageInvoiced = require('../getAverageInvoiced');
|
2018-04-17 11:38:40 +00:00
|
|
|
const {rawSql} = require('../../../test-helpers/rawSql');
|
2018-04-16 09:21:13 +00:00
|
|
|
const model = {
|
|
|
|
remoteMethod: () => {}
|
|
|
|
};
|
|
|
|
|
|
|
|
rawSql(model);
|
|
|
|
getAverageInvoiced(model);
|
|
|
|
|
|
|
|
describe('client getAverageInvoiced()', () => {
|
|
|
|
it('should call the getAverageInvoiced method', done => {
|
|
|
|
model.getAverageInvoiced(101)
|
|
|
|
.then(response => {
|
|
|
|
expect(response.invoiced).toEqual(0);
|
|
|
|
done();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|