feat(claimLog): added claim log section #1370
|
@ -7,6 +7,17 @@ describe('claim log()', () => {
|
||||||
it('should return results filtering by user id', async() => {
|
it('should return results filtering by user id', async() => {
|
||||||
const result = await app.models.Claim.logs({args: {userFk: salesPersonId}}, claimId);
|
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(result.length).toBeGreaterThan(0);
|
||||||
|
expect(firstRow).toEqual(jasmine.objectContaining(expectedObject));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue