Block preliminary property assessor PDFs
This commit is contained in:
@@ -68,3 +68,22 @@ test("renderReportPdf requires recipient email", async () => {
|
||||
ReportValidationError
|
||||
);
|
||||
});
|
||||
|
||||
test("renderReportPdf rejects a preliminary report with pending verdict", async () => {
|
||||
const outputPath = path.join(os.tmpdir(), `property-assessor-preliminary-${Date.now()}.pdf`);
|
||||
await assert.rejects(
|
||||
() =>
|
||||
renderReportPdf(
|
||||
{
|
||||
...samplePayload,
|
||||
verdict: {
|
||||
decision: "pending",
|
||||
fairValueRange: "Not established",
|
||||
offerGuidance: "Still needs comps and decision-grade analysis."
|
||||
}
|
||||
},
|
||||
outputPath
|
||||
),
|
||||
/decision-grade|preliminary|pending/i
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user