added invoiceOut descriptor #377

Merged
carlosjr merged 5 commits from 2446-ticket_index_overlap_ref_and_state into dev 2020-09-14 14:41:21 +00:00
1 changed files with 4 additions and 6 deletions
Showing only changes of commit 13a5c4c4c9 - Show all commits

View File

@ -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() => {