diff --git a/SeaHavenIndustries.Tests/WorkOrderPhase6Tests.cs b/SeaHavenIndustries.Tests/WorkOrderPhase6Tests.cs index a73c6f3..ce285c1 100644 --- a/SeaHavenIndustries.Tests/WorkOrderPhase6Tests.cs +++ b/SeaHavenIndustries.Tests/WorkOrderPhase6Tests.cs @@ -1930,10 +1930,19 @@ public class WorkOrderCompletionDocFileRulesTests } [Fact] - public void MediaRules_StillRejectPdf() + public void MediaRules_StillRejectPdfOutsideDocumentCategories() { // The completion-doc allowlist must not widen the SH-116 media allowlist. - Assert.False(WorkOrderMediaFileRules.IsAllowed(FormFile(Pdf, "completion.pdf", "application/pdf"))); + // SH-171 since added documents to media for Extra and Aveta, which is a + // deliberate widening of its own; what this guards is that it stopped + // there. Completion is the category SH-337 touches, and a photo slot + // must still refuse a PDF. + Assert.False(WorkOrderMediaFileRules.IsAllowed( + FormFile(Pdf, "completion.pdf", "application/pdf"), WorkOrderMediaCategory.Completion)); + Assert.False(WorkOrderMediaFileRules.IsAllowed( + FormFile(Pdf, "completion.pdf", "application/pdf"), WorkOrderMediaCategory.Before)); + Assert.False(WorkOrderMediaFileRules.IsAllowed( + FormFile(Pdf, "completion.pdf", "application/pdf"), WorkOrderMediaCategory.After)); } }