Retain inquiry audit context on failure

This commit is contained in:
SepehrYahyaee
2026-09-13 11:42:20 +03:30
parent fe22e69351
commit 287978a555
3 changed files with 67 additions and 20 deletions

View File

@@ -230,10 +230,18 @@ describe("inquiry participant resolver", () => {
expect(query).toHaveBeenCalledTimes(2);
expect(result.plateKind).toBe("PREVIOUS");
expect(result.attempts).toEqual([
expect(result.attempts).toMatchObject([
{ plateKind: "CURRENT", succeeded: false, error: "not found" },
{ plateKind: "PREVIOUS", succeeded: true, usable: true },
]);
expect(result.attempts[0]).toMatchObject({
plate: currentPlate,
vin: "NAAM01E15HK123456",
});
expect(result.attempts[1]).toMatchObject({
plate: previousPlate,
vin: "NAAM01E15HK123456",
});
});
it("rejects a car-body policyholder on a third-party case", () => {