forked from Yara724/api
updated the fucking mf fanavaran
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import {
|
||||
collectPartyVinCandidates,
|
||||
filterPoliciesByLine,
|
||||
insuranceLineLabel,
|
||||
parseLastCarPolicyInput,
|
||||
@@ -114,6 +115,39 @@ describe("fanavaran last car policy", () => {
|
||||
).toBe("NAS451100P4934023");
|
||||
});
|
||||
|
||||
it("does not let chassis stored on vehicle.vin beat the inquiry VIN", () => {
|
||||
const party = {
|
||||
vehicle: {
|
||||
vin: "NAAN01CA9BK493683",
|
||||
inquiry: {
|
||||
mapped: {
|
||||
VIN: "IRFC901V119493683",
|
||||
ChassisNo: "NAAN01CA9BK493683",
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
expect(pickVinFromPartyVehicle(party)).toBe("IRFC901V119493683");
|
||||
expect(collectPartyVinCandidates(party)).toEqual([
|
||||
"IRFC901V119493683",
|
||||
"NAAN01CA9BK493683",
|
||||
]);
|
||||
});
|
||||
|
||||
it("prefers the VIN-inquiry row that already has PlaqueKindId", () => {
|
||||
expect(
|
||||
pickFanavaranVehicleFromInquiry([
|
||||
{ Id: 1, VIN: "IRFC901V119493683" },
|
||||
{ Id: 2, VIN: "IRFC901V119493683", PlaqueKindId: 15, PlaqueSampleId: 24 },
|
||||
]),
|
||||
).toEqual({
|
||||
Id: 2,
|
||||
VIN: "IRFC901V119493683",
|
||||
PlaqueKindId: 15,
|
||||
PlaqueSampleId: 24,
|
||||
});
|
||||
});
|
||||
|
||||
it("reads plaque kind and sample from VIN inquiry for the lookup filter", () => {
|
||||
expect(
|
||||
pickFanavaranPlaqueLookupFields({
|
||||
|
||||
Reference in New Issue
Block a user