19 lines
476 B
JavaScript
19 lines
476 B
JavaScript
|
const getAverageInvoiced = require('../getAverageInvoiced');
|
||
|
const {rawSql} = require('./helpers');
|
||
|
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();
|
||
|
});
|
||
|
});
|
||
|
});
|