forked from Yara724/api
YARA-1257, YARA-1272, YARA-985
This commit is contained in:
@@ -52,6 +52,32 @@ describe("ExpertClaimService expert-reply pricing", () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it("allows a deliver-damaged-part line without a branch", () => {
|
||||
const service = createService() as any;
|
||||
|
||||
expect(
|
||||
service.validateAndNormalizeDaghiForExpertReplyV2([
|
||||
{
|
||||
partId: 201,
|
||||
typeOfDamage: TypeOfDamage.Change,
|
||||
price: "100000",
|
||||
salary: "100000",
|
||||
totalPayment: "200000",
|
||||
daghi: { option: DaghiOption.DELIVER_DAMAGED_PART },
|
||||
},
|
||||
]),
|
||||
).toEqual([
|
||||
{
|
||||
partId: 201,
|
||||
typeOfDamage: TypeOfDamage.Change,
|
||||
price: "100000",
|
||||
salary: "100000",
|
||||
totalPayment: "200000",
|
||||
daghi: { option: DaghiOption.DELIVER_DAMAGED_PART },
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
it("rejects a blank pricing line on the legacy submit endpoint before changing status", async () => {
|
||||
const service = createService() as any;
|
||||
const findAndUpdate = jest.fn();
|
||||
|
||||
Reference in New Issue
Block a user