package com.ruoyi.account.controller;
|
|
import org.junit.jupiter.api.Test;
|
|
import static org.junit.jupiter.api.Assertions.assertFalse;
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
|
class FileControllerTest {
|
|
@Test
|
void managementUploadAllowsConfiguredImagesDocumentsAndFaqVideos() {
|
String allowed = FileController.mergeAllowedExt("png,jpg", "pdf,doc,docx", "mp4,avi,rmvb,mov");
|
|
assertTrue(FileController.isAllowedExt("png", allowed));
|
assertTrue(FileController.isAllowedExt("pdf", allowed));
|
assertTrue(FileController.isAllowedExt("MP4", allowed));
|
assertTrue(FileController.isAllowedExt(".mov", allowed));
|
assertFalse(FileController.isAllowedExt("jsp", allowed));
|
}
|
}
|