|
@@ -160,7 +160,7 @@ class FlashDeliveryApplicationServiceTest {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Test
|
|
@Test
|
|
|
- void scheduledCreateGeneratesUserOnlyPinAndStoresSenderProof() {
|
|
|
|
|
|
|
+ void scheduledCreateGeneratesUserOnlyPinAndStoresRelativeSenderProof() {
|
|
|
Fixture fixture = new Fixture();
|
|
Fixture fixture = new Fixture();
|
|
|
when(fixture.userMapper.selectOrdinaryUserIdsByNormalizedPhone("0922222222"))
|
|
when(fixture.userMapper.selectOrdinaryUserIdsByNormalizedPhone("0922222222"))
|
|
|
.thenReturn(List.of(88L));
|
|
.thenReturn(List.of(88L));
|
|
@@ -174,6 +174,7 @@ class FlashDeliveryApplicationServiceTest {
|
|
|
when(fixture.imageMapper.selectList(any(Wrapper.class))).thenReturn(List.of());
|
|
when(fixture.imageMapper.selectList(any(Wrapper.class))).thenReturn(List.of());
|
|
|
when(fixture.logMapper.selectList(any(Wrapper.class))).thenReturn(List.of());
|
|
when(fixture.logMapper.selectList(any(Wrapper.class))).thenReturn(List.of());
|
|
|
FlashDeliveryCreateRequest request = createRequest();
|
|
FlashDeliveryCreateRequest request = createRequest();
|
|
|
|
|
+ request.setSenderImageUrls(List.of("/profile/upload/2026/09/07/sender.jpg"));
|
|
|
|
|
|
|
|
var result = fixture.service.create(7L, request);
|
|
var result = fixture.service.create(7L, request);
|
|
|
|
|
|
|
@@ -183,6 +184,7 @@ class FlashDeliveryApplicationServiceTest {
|
|
|
verify(fixture.imageMapper).insert(image.capture());
|
|
verify(fixture.imageMapper).insert(image.capture());
|
|
|
assertEquals("SENDER", image.getValue().getProofType());
|
|
assertEquals("SENDER", image.getValue().getProofType());
|
|
|
assertEquals("USER", image.getValue().getOperatorType());
|
|
assertEquals("USER", image.getValue().getOperatorType());
|
|
|
|
|
+ assertEquals("/profile/upload/2026/09/07/sender.jpg", image.getValue().getImageUrl());
|
|
|
ArgumentCaptor<FlashDeliveryOrder> saved = ArgumentCaptor.forClass(FlashDeliveryOrder.class);
|
|
ArgumentCaptor<FlashDeliveryOrder> saved = ArgumentCaptor.forClass(FlashDeliveryOrder.class);
|
|
|
verify(fixture.orderMapper).insert(saved.capture());
|
|
verify(fixture.orderMapper).insert(saved.capture());
|
|
|
assertEquals("SCHEDULED", saved.getValue().getDeliveryMode());
|
|
assertEquals("SCHEDULED", saved.getValue().getDeliveryMode());
|