forked from Yara724/api
fixed branch being mandatory
This commit is contained in:
@@ -230,4 +230,38 @@ describe("buildInsurerFileReport", () => {
|
||||
"نیاز به تعویض سپر جلو",
|
||||
);
|
||||
});
|
||||
|
||||
it("uses the stored V4 licence type for a driver who differs from the policyholder", () => {
|
||||
const report = buildInsurerFileReport({
|
||||
overview: { publicId: "A00011" },
|
||||
blame: {
|
||||
type: "THIRD_PARTY",
|
||||
parties: [
|
||||
{
|
||||
role: "FIRST",
|
||||
person: { userId: "guilty", fullName: "مقصر" },
|
||||
},
|
||||
{
|
||||
role: "SECOND",
|
||||
person: {
|
||||
userId: "damaged",
|
||||
fullName: "بیمهگذار زیاندیده",
|
||||
driverIsInsurer: false,
|
||||
nationalCodeOfDriver: "0123456789",
|
||||
driverLicense: "L-123",
|
||||
licenseType: "پایه یک",
|
||||
},
|
||||
},
|
||||
],
|
||||
expert: { decision: { guiltyPartyId: "guilty" } },
|
||||
},
|
||||
});
|
||||
|
||||
expect(getFieldValue(report, PR.driverSection, PR.nationalCode)).toBe(
|
||||
"0123456789",
|
||||
);
|
||||
expect(getFieldValue(report, PR.driverSection, PR.licenseType)).toBe(
|
||||
"پایه یک",
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user