diff --git a/services/client/common/models/address-observation.json b/services/client/common/models/address-observation.json index 53b6155ec..147e19f07 100644 --- a/services/client/common/models/address-observation.json +++ b/services/client/common/models/address-observation.json @@ -8,27 +8,27 @@ } }, "properties": { - "id": { - "type": "Number", - "id": true, - "description": "Identifier" - }, - "description": { - "type": "string", - "required": true - } + "id": { + "type": "Number", + "id": true, + "description": "Identifier" + }, + "description": { + "type": "string", + "required": true + } }, "relations": { - "address": { - "type": "belongsTo", - "model": "Address", - "foreignKey": "addressFk" - }, - "observationType": { - "type": "belongsTo", - "model": "ObservationType", - "foreignKey": "observationTypeFk" - } + "address": { + "type": "belongsTo", + "model": "Address", + "foreignKey": "addressFk" + }, + "observationType": { + "type": "belongsTo", + "model": "ObservationType", + "foreignKey": "observationTypeFk" + } } - } +} \ No newline at end of file diff --git a/services/loopback/common/methods/client/specs/getAverageInvoiced.spec.js b/services/loopback/common/methods/client/specs/getAverageInvoiced.spec.js new file mode 100644 index 000000000..46072461a --- /dev/null +++ b/services/loopback/common/methods/client/specs/getAverageInvoiced.spec.js @@ -0,0 +1,18 @@ +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(); + }); + }); +});