forked from Yara724/api
Enforce claim beneficiary access and retire unused legacy APIs
This commit is contained in:
@@ -302,28 +302,6 @@ describe("ExpertClaimService expert-reply pricing", () => {
|
||||
]);
|
||||
});
|
||||
|
||||
it("rejects a blank pricing line on the legacy submit endpoint before changing status", async () => {
|
||||
const service = createService() as any;
|
||||
const findAndUpdate = jest.fn();
|
||||
service.claimRequestManagementDbService = {
|
||||
findOne: jest.fn().mockResolvedValue({
|
||||
_id: "legacy-claim",
|
||||
actorLocked: { actorId: "expert-1" },
|
||||
unlockTime: new Date(Date.now() + 60_000),
|
||||
lockFile: true,
|
||||
}),
|
||||
findAndUpdate,
|
||||
};
|
||||
|
||||
await expect(
|
||||
service.submitReplyRequest("legacy-claim", blankPricingReply, {
|
||||
sub: "expert-1",
|
||||
}),
|
||||
).rejects.toBeInstanceOf(BadRequestException);
|
||||
|
||||
expect(findAndUpdate).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("rejects a blank pricing line on the V2 submit endpoint before completion", async () => {
|
||||
const service = createService() as any;
|
||||
const findByIdAndUpdate = jest.fn();
|
||||
|
||||
Reference in New Issue
Block a user