forked from Yara724/api
Fixed daqi being enforced on REPAIR
This commit is contained in:
@@ -27,6 +27,31 @@ function createService() {
|
||||
}
|
||||
|
||||
describe("ExpertClaimService expert-reply pricing", () => {
|
||||
it("allows a repair line without daghi and removes a stray daghi payload", () => {
|
||||
const service = createService() as any;
|
||||
|
||||
expect(
|
||||
service.validateAndNormalizeDaghiForExpertReplyV2([
|
||||
{
|
||||
partId: 201,
|
||||
typeOfDamage: TypeOfDamage.Repair,
|
||||
price: "10000",
|
||||
salary: "0",
|
||||
totalPayment: "10000",
|
||||
daghi: { option: DaghiOption.NO_VALUE },
|
||||
},
|
||||
]),
|
||||
).toEqual([
|
||||
{
|
||||
partId: 201,
|
||||
typeOfDamage: TypeOfDamage.Repair,
|
||||
price: "10000",
|
||||
salary: "0",
|
||||
totalPayment: "10000",
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
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