fix: enforce dropship whole-pallet receiving
This commit is contained in:
+16
@@ -364,6 +364,22 @@ class ReceivingContainerServiceBehaviorTest {
|
||||
verifyNoInteractions(warehouse);
|
||||
}
|
||||
|
||||
@Test
|
||||
void dropshipFbaBulkReceiveIsRejectedBeforeWarehouseCalls() {
|
||||
stubCurrent("FBA", "CONT-A");
|
||||
LastlegOrder dropshipOrder = order("FBA");
|
||||
dropshipOrder.setOrderType("ONE_CLICK_DROPSHIP");
|
||||
when(orders.selectById(1L)).thenReturn(dropshipOrder);
|
||||
|
||||
assertThatThrownBy(() -> service.receiveBulk("7", "receiver",
|
||||
new ReceivingContainerRequests.BulkReceive("IN-1", "PAL-1", 1, "dropship-bulk-key")))
|
||||
.isInstanceOf(ResponseStatusException.class)
|
||||
.hasMessageContaining("complete source pallet");
|
||||
|
||||
verifyNoInteractions(warehouse);
|
||||
verifyNoInteractions(workflow);
|
||||
}
|
||||
|
||||
@Test
|
||||
void crossContainerCartonAndMismatchedPalletAreRejectedBeforeReservation() {
|
||||
stubCurrent("OVERSEAS", "CONT-A");
|
||||
|
||||
Reference in New Issue
Block a user