test(lastleg): align relabel upload fixture and PDA status comment

This commit is contained in:
2026-09-15 11:45:40 +08:00
parent 3ebe254c45
commit 3fb9909dd3
2 changed files with 4 additions and 2 deletions
@@ -28,11 +28,13 @@ class RelabelDocumentServiceTest {
when(applications.lockNo("101","RL-1")).thenReturn(application);when(applications.findNo("101","RL-1")).thenReturn(application);
}
@Test void totalUploadPersistsReturnedMetadataAndExposesSummary(){
when(files.upload("101","OVERSEAS_RELABEL_TOTAL_DOCUMENT","11",7L,pdf)).thenReturn(new RelabelDocumentFileGateway.UploadedFile(99L,"labels.pdf","application/pdf",15));
when(files.upload("101","OVERSEAS_RELABEL_CARTON_TOTAL_DOCUMENT","11",7L,pdf)).thenReturn(new RelabelDocumentFileGateway.UploadedFile(99L,"labels.pdf","application/pdf",15));
var result=service.uploadTotalFile("101","RL-1",7L,pdf);
assertThat(result.application().totalFileId()).isEqualTo("99");
assertThat(result.application().totalFileName()).isEqualTo("labels.pdf");
assertThat(result.application().totalFileUrl()).endsWith("/files/99/download?scope=TOTAL");
assertThat(application.getCartonTotalFileId()).isEqualTo("99");
verify(files).upload("101","OVERSEAS_RELABEL_CARTON_TOTAL_DOCUMENT","11",7L,pdf);
verify(applications).updateById(application);
}
@Test void itemUploadBindsOwnCustomerApplicationAndDistinctCategory(){