const app = require('vn-loopback/server/server'); describe('ticket-request deny()', () => { let request; afterAll(async done => { let params = { isOk: null, atenderFk: request.atenderFk, response: null, }; await request.updateAttributes(params); done(); }); it('should return all ticket requests', async() => { let ctx = {req: {accessToken: {userId: 9}}, args: {id: 4, observation: 'my observation'}}; request = await app.models.TicketRequest.findById(ctx.args.id); let result = await app.models.TicketRequest.deny(ctx); expect(result.id).toEqual(4); }); });