added invoiceOut descriptor #377
|
@ -67,14 +67,12 @@ describe('ticket filter()', () => {
|
|||
const ctx = {req: {accessToken: {userId: 9}}, args: {pending: true}};
|
||||
const filter = {};
|
||||
const result = await app.models.Ticket.filter(ctx, filter);
|
||||
const firstRow = result[0];
|
||||
const secondRow = result[1];
|
||||
const thirdRow = result[2];
|
||||
|
||||
const length = result.length;
|
||||
const anyResult = result[Math.floor(Math.random() * Math.floor(length))];
|
||||
|
||||
expect(result.length).toEqual(7);
|
||||
expect(firstRow.state).toEqual('Libre');
|
||||
expect(secondRow.state).toEqual('Libre');
|
||||
expect(thirdRow.state).toEqual('Libre');
|
||||
expect(anyResult.state).toMatch(/(Libre|Arreglar)/);
|
||||
});
|
||||
|
||||
it('should return the tickets that are not pending', async() => {
|
||||
|
|
Loading…
Reference in New Issue