Updated unit test
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2023-03-06 13:44:03 +01:00
parent 4f091330a7
commit 9f4aed7d83
1 changed files with 11 additions and 0 deletions

View File

@ -7,6 +7,17 @@ describe('claim log()', () => {
it('should return results filtering by user id', async() => {
const result = await app.models.Claim.logs({args: {userFk: salesPersonId}}, claimId);
const expectedObject = {
model: 'Claim',
action: 'update',
changes: [
{property: 'hasToPickUp', before: false, after: true}
]
};
const firstRow = result[0];
expect(result.length).toBeGreaterThan(0);
expect(firstRow).toEqual(jasmine.objectContaining(expectedObject));
});
});