!313 修复上传七牛云无mime type问题

Merge pull request !313 from 石溪/master
This commit is contained in:
芋道源码
2022-11-29 13:12:54 +00:00
committed by Gitee
14 changed files with 15 additions and 14 deletions

View File

@@ -240,7 +240,7 @@ public class FileConfigServiceImplTest extends BaseDbUnitTest {
// mock 获得 Client
FileClient fileClient = mock(FileClient.class);
when(fileClientFactory.getFileClient(eq(id))).thenReturn(fileClient);
when(fileClient.upload(any(), any())).thenReturn("https://www.iocoder.cn");
when(fileClient.upload(any(), any(), any())).thenReturn("https://www.iocoder.cn");
// 调用,并断言
assertEquals("https://www.iocoder.cn", fileConfigService.testFileConfig(id));

View File

@@ -79,7 +79,7 @@ public class FileServiceTest extends BaseDbUnitTest {
FileClient client = mock(FileClient.class);
when(fileConfigService.getMasterFileClient()).thenReturn(client);
String url = randomString();
when(client.upload(same(content), same(path))).thenReturn(url);
when(client.upload(same(content), same(path), same("image/jpeg"))).thenReturn(url);
when(client.getId()).thenReturn(10L);
String name = "单测文件名";
// 调用