#556 state back end unit test

This commit is contained in:
Carlos Jimenez 2018-08-13 12:46:11 +02:00
parent 8fa84c5074
commit fbe0cf2111
1 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,17 @@
const app = require(`${servicesDir}/Ticket/server/server`);
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();
});
});
});