forked from Yara724/api
Changed ESG inquiries main endpoint
This commit is contained in:
@@ -155,6 +155,30 @@ describe("SandHubService inquiry mocks", () => {
|
||||
expect(result.mapped.PrntPlcyCmpDocNo).toBe("REAL-ESG-POLICY");
|
||||
});
|
||||
|
||||
it("uses ESG carByPlate for live Parsian third-party plate inquiries", async () => {
|
||||
process.env.CLIENT_ID = "8";
|
||||
externalInquirySettings.isInquiryLive.mockResolvedValue(true);
|
||||
const esg = jest.spyOn(service as any, "makeEsgRequest").mockResolvedValue({
|
||||
success: true,
|
||||
data: { PrntCmpDocNo: "ESG-PLATE-POLICY" },
|
||||
});
|
||||
|
||||
await service.getTejaratBlockInquiry(userDetail);
|
||||
|
||||
expect(esg).toHaveBeenCalledWith(
|
||||
expect.stringMatching(/\/inquiry\/carByPlate$/),
|
||||
expect.objectContaining({
|
||||
nationalCode: "1234567890",
|
||||
plk1: "16",
|
||||
plk2: "12",
|
||||
plk3: "498",
|
||||
plksrl: "60",
|
||||
}),
|
||||
"thirdPartyPlate",
|
||||
undefined,
|
||||
);
|
||||
});
|
||||
|
||||
it("preserves ESG messageFa for a plate inquiry", async () => {
|
||||
process.env.CLIENT_ID = "8";
|
||||
externalInquirySettings.isInquiryLive.mockResolvedValue(true);
|
||||
|
||||
Reference in New Issue
Block a user