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