salix/modules/client/back/methods/recovery/hasActiveRecovery.spec.js

16 lines
509 B
JavaScript
Raw Normal View History

2019-06-11 06:54:03 +00:00
const app = require('vn-loopback/server/server');
describe('client hasActiveRecovery', () => {
it(`should return false if the client doesn't owes`, async() => {
let hasActiveRecovery = await app.models.Recovery.hasActiveRecovery(101);
expect(hasActiveRecovery).toBeFalsy();
});
it('should return true if the client owes', async() => {
let hasActiveRecovery = await app.models.Recovery.hasActiveRecovery(102);
expect(hasActiveRecovery).toBeTruthy();
});
});