Merge pull request 'Fixed mock data' (#315) from s.yahyaee/yara724-api:main into main

Reviewed-on: Yara724/api#315
This commit is contained in:
2026-09-14 16:07:02 +03:30
2 changed files with 9 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ import {
} from "@nestjs/common";
import { ExternalInquirySettingsService } from "src/client/external-inquiry-settings.service";
import { SandHubDetailDto } from "./dto/sand-hub.dto";
import { isMappedPolicyCurrent } from "src/request-management/inquiry-participant-resolver";
describe("SandHubService inquiry mocks", () => {
const httpService = { post: jest.fn() };
@@ -56,6 +57,12 @@ describe("SandHubService inquiry mocks", () => {
});
});
it("keeps disabled-live third-party mock policy usable", async () => {
const result = await service.getTejaratBlockInquiry(userDetail);
expect(isMappedPolicyCurrent(result.mapped)).toBe(true);
});
it("returns car-body mock without HTTP when carBodyPlate is off", async () => {
const result = await service.getTejaratCarBodyInquiry(userDetail);

View File

@@ -200,7 +200,8 @@ export class SandHubService {
CompanyCode: ctx.companyId,
IssueDate: "1403/04/06",
SatrtDate: "1403/04/06",
EndDate: "1404/04/06",
// Keep disabled-live mock mode stable; this fixture must not expire with wall-clock time.
EndDate: "1499/12/29",
Thrname: "",
EndorseText: null,
PolicyHealthLossCount: 0,