8032-devToTest_2440 #3009
|
@ -39,7 +39,7 @@ describe('ticket setWeight()', () => {
|
||||||
expect(ticket.weight).toEqual(weight);
|
expect(ticket.weight).toEqual(weight);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should throw an error if the user does not have enough privileges', async() => {
|
it('should throw an error if the user is not allocated to the same department', async() => {
|
||||||
ctx.req.accessToken.userId = employeeId;
|
ctx.req.accessToken.userId = employeeId;
|
||||||
try {
|
try {
|
||||||
const ticketId = 10;
|
const ticketId = 10;
|
||||||
|
@ -47,7 +47,7 @@ describe('ticket setWeight()', () => {
|
||||||
|
|
||||||
await models.Ticket.setWeight(ctx, ticketId, weight, opts);
|
await models.Ticket.setWeight(ctx, ticketId, weight, opts);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
expect(e.message).toEqual('You don\'t have enough privileges');
|
expect(e.message).toEqual('This ticket is not allocated to your department');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue