2018-04-13 16:32:20 +00:00
|
|
|
const getMana = require('../getMana');
|
|
|
|
const model = {
|
|
|
|
remoteMethod: () => {}
|
|
|
|
};
|
2018-04-18 12:37:17 +00:00
|
|
|
let Loopback = require('../../../test-helpers/loopback');
|
|
|
|
Loopback.init(model);
|
2018-04-13 16:32:20 +00:00
|
|
|
|
2018-04-18 12:37:17 +00:00
|
|
|
Loopback.rawSql(model);
|
2018-04-13 16:32:20 +00:00
|
|
|
getMana(model);
|
|
|
|
|
|
|
|
describe('client getMana()', () => {
|
|
|
|
it('should call the getMana method', done => {
|
|
|
|
model.getMana(101)
|
|
|
|
.then(response => {
|
2018-04-18 11:40:09 +00:00
|
|
|
expect(response.mana).toEqual(30.02);
|
2018-04-13 16:32:20 +00:00
|
|
|
done();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|