salix/modules/client/back/methods/client/specs/canCreateTicket.spec.js

18 lines
540 B
JavaScript

const app = require('vn-loopback/server/server');
describe('Client canCreateTicket', () => {
it('should receive true if the client is active', async() => {
let id = 105;
let canCreateTicket = await app.models.Client.canCreateTicket(id);
expect(canCreateTicket).toBeTruthy();
});
it(`should receive false if the client isn't active`, async() => {
let id = 106;
let canCreateTicket = await app.models.Client.canCreateTicket(id);
expect(canCreateTicket).toBe(false);
});
});