forked from Yara724/api
update yara
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
import { ClaimCaseStatus } from "src/Types&Enums/claim-request-management/claim-case-status.enum";
|
||||
import { fanavaranClaimReferences } from "./fanavaran-claim-references";
|
||||
|
||||
describe("fanavaranClaimReferences", () => {
|
||||
it("returns all four Fanavaran ids when the claim is completed", () => {
|
||||
expect(
|
||||
fanavaranClaimReferences({
|
||||
status: ClaimCaseStatus.COMPLETED,
|
||||
claimId: 987654,
|
||||
claimNo: 123456,
|
||||
dmgCaseId: 11,
|
||||
expertiseId: 22,
|
||||
}),
|
||||
).toEqual({
|
||||
claimId: 987654,
|
||||
claimNo: 123456,
|
||||
dmgCaseId: 11,
|
||||
expertiseId: 22,
|
||||
});
|
||||
});
|
||||
|
||||
it("omits missing ids", () => {
|
||||
expect(
|
||||
fanavaranClaimReferences({
|
||||
status: ClaimCaseStatus.COMPLETED,
|
||||
claimId: 987654,
|
||||
claimNo: null,
|
||||
dmgCaseId: undefined,
|
||||
expertiseId: 22,
|
||||
}),
|
||||
).toEqual({
|
||||
claimId: 987654,
|
||||
expertiseId: 22,
|
||||
});
|
||||
});
|
||||
|
||||
it("returns undefined before the claim is completed", () => {
|
||||
expect(
|
||||
fanavaranClaimReferences({
|
||||
status: ClaimCaseStatus.EXPERT_REVIEWING,
|
||||
claimId: 987654,
|
||||
dmgCaseId: 11,
|
||||
}),
|
||||
).toBeUndefined();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user