fix(lastleg): inspect occupied pallets for PDA queries
This commit is contained in:
+2
-2
@@ -42,7 +42,7 @@ class PdaWarehouseServiceTest {
|
||||
|
||||
@Test
|
||||
void palletFromAnotherWarehouseIsRejected() {
|
||||
when(warehouse.resolvePallet("PAL-1")).thenReturn(new WarehouseResourceGateway.WarehousePalletReference(
|
||||
when(warehouse.inspectPallet("PAL-1")).thenReturn(new WarehouseResourceGateway.WarehousePalletReference(
|
||||
1L, "PAL-1", 901L, 2L, "OCCUPIED", null, 1));
|
||||
assertThatThrownBy(() -> service.pallet(900L, new PdaWarehouseRequests.Scan("PAL-1")))
|
||||
.isInstanceOf(ResponseStatusException.class).hasMessageContaining("409");
|
||||
@@ -50,7 +50,7 @@ class PdaWarehouseServiceTest {
|
||||
|
||||
@Test
|
||||
void missingPalletIsReportedAsNotFound() {
|
||||
when(warehouse.resolvePallet("MISSING")).thenReturn(null);
|
||||
when(warehouse.inspectPallet("MISSING")).thenReturn(null);
|
||||
|
||||
assertThatThrownBy(() -> service.pallet(900L, new PdaWarehouseRequests.Scan("MISSING")))
|
||||
.isInstanceOf(ResponseStatusException.class).hasMessageContaining("404");
|
||||
|
||||
Reference in New Issue
Block a user