17 lines
517 B
JavaScript
17 lines
517 B
JavaScript
const getVolume = require('../get-volume');
|
|
|
|
describe('client getVolume()', () => {
|
|
it('should call the getVolume method', done => {
|
|
let ticketFk = 1;
|
|
let self = jasmine.createSpyObj('self', ['remoteMethod', 'rawSql']);
|
|
self.rawSql.and.returnValue(Promise.resolve([{volumeData: 100}]));
|
|
getVolume(self);
|
|
|
|
self.getVolume(ticketFk)
|
|
.then(result => {
|
|
expect(result).toEqual([{volumeData: 100}]);
|
|
done();
|
|
});
|
|
});
|
|
});
|