2018-08-14 12:52:39 +00:00
|
|
|
const app = require(`${servicesDir}/ticket/server/server`);
|
2018-08-13 10:46:11 +00:00
|
|
|
|
|
|
|
describe('loopback model State', () => {
|
|
|
|
describe('isAlertLevelZero()', () => {
|
|
|
|
it('should return true if the alerLevel is 0', async() => {
|
|
|
|
let result = await app.models.State.isAlertLevelZero(1);
|
|
|
|
|
|
|
|
expect(result).toBeTruthy();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should do nothing if the alertLevel isnt 0', async() => {
|
|
|
|
let result = await app.models.State.isAlertLevelZero(8);
|
|
|
|
|
|
|
|
expect(result).toBeFalsy();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|