diff --git a/services/loopback/common/models/specs/state.spec.js b/services/loopback/common/models/specs/state.spec.js new file mode 100644 index 000000000..a38e1b9ec --- /dev/null +++ b/services/loopback/common/models/specs/state.spec.js @@ -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(); + }); + }); +});