Merge test fixes into dev dropship flow
This commit is contained in:
@@ -44,6 +44,8 @@ class InternalBusinessFileServiceTest {
|
||||
when(storage.store(eq(0L), anyString(), same(file), any(BusinessFileCategory.class))).thenAnswer(invocation ->
|
||||
new BusinessFileStorage.Stored("business-files/0/" + invocation.getArgument(1) + "/customs.pdf",
|
||||
"application/pdf", file.getSize(), "b".repeat(64), "customs.pdf"));
|
||||
when(storage.store(0L, "51", file, BusinessFileCategory.OVERSEAS_UNLOAD_PHOTO)).thenReturn(new BusinessFileStorage.Stored(
|
||||
"business-files/0/51/unload.jpg", "image/jpeg", file.getSize(), "c".repeat(64), "unload.jpg"));
|
||||
when(files.insert(any(FileObjectEntity.class))).thenAnswer(invocation -> {
|
||||
((FileObjectEntity) invocation.getArgument(0)).setId(81L); return 1;
|
||||
});
|
||||
@@ -72,7 +74,7 @@ class InternalBusinessFileServiceTest {
|
||||
verify(storage).store(0L, "41", file, BusinessFileCategory.CONTAINER_PICKUP_ORDER);
|
||||
verify(storage).store(0L, "51", file, BusinessFileCategory.OVERSEAS_UNLOAD_PHOTO);
|
||||
assertThatThrownBy(() -> service.upload(11L, "OVERSEAS_UNLOAD_PHOTO", "51", 7L, file))
|
||||
.isInstanceOf(BizException.class).hasMessageContaining("必须归属平台");
|
||||
.isInstanceOf(BizException.class).hasMessageContaining("卸柜照片必须归属平台");
|
||||
}
|
||||
|
||||
@Test void oceanBookingDocumentUsesPlatformAndBookingOwnership() {
|
||||
|
||||
Reference in New Issue
Block a user