2018-04-17 12:49:55 +00:00
|
|
|
const getTaxes = require('../get-taxes');
|
|
|
|
const model = {
|
|
|
|
remoteMethod: () => {}
|
|
|
|
};
|
2018-04-18 12:37:17 +00:00
|
|
|
let Loopback = require('../../../test-helpers/loopback');
|
|
|
|
Loopback.init(model);
|
2018-04-17 12:49:55 +00:00
|
|
|
|
2018-04-18 12:37:17 +00:00
|
|
|
Loopback.rawSql(model);
|
2018-04-17 12:49:55 +00:00
|
|
|
getTaxes(model);
|
|
|
|
|
|
|
|
describe('ticket getTaxes()', () => {
|
|
|
|
it('should call the getTaxes method', done => {
|
|
|
|
model.getTaxes(1)
|
|
|
|
.then(response => {
|
|
|
|
expect(response[0].tax).toEqual(1.05);
|
|
|
|
done();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|