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() => {
|
2021-06-23 11:24:23 +00:00
|
|
|
let hasActiveRecovery = await app.models.Recovery.hasActiveRecovery(1101);
|
2019-06-11 06:54:03 +00:00
|
|
|
|
|
|
|
expect(hasActiveRecovery).toBeFalsy();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should return true if the client owes', async() => {
|
2021-06-23 11:24:23 +00:00
|
|
|
let hasActiveRecovery = await app.models.Recovery.hasActiveRecovery(1102);
|
2019-06-11 06:54:03 +00:00
|
|
|
|
|
|
|
expect(hasActiveRecovery).toBeTruthy();
|
|
|
|
});
|
|
|
|
});
|