feat: gate overseas receiving and harden phase4 workflows
This commit is contained in:
+13
@@ -50,6 +50,19 @@ class WarehouseResourceServiceTest {
|
||||
.isEqualTo(IdType.ASSIGN_ID);
|
||||
}
|
||||
|
||||
@Test
|
||||
void resolvesOnlyPublicLocationInsideBoundWarehouse() {
|
||||
WarehouseLocationEntity location = new WarehouseLocationEntity(); location.setId(30001L);
|
||||
location.setWarehouseId(WAREHOUSE); location.setCustomerId(0L); location.setLocationCode("A-01");
|
||||
location.setLocationType("STORAGE"); location.setMaxLoadKg(new BigDecimal("1000")); location.setStatus("IDLE");
|
||||
when(repository.findLocationByCode(0L, WAREHOUSE, "A-01")).thenReturn(location);
|
||||
|
||||
var result = service.resolvePublicLocation(WAREHOUSE, " A-01 ");
|
||||
|
||||
assertThat(result.locationId()).isEqualTo(30001L);
|
||||
assertThat(result.locationCode()).isEqualTo("A-01");
|
||||
}
|
||||
|
||||
@Test
|
||||
void createsLocationWithSnowflakeAssignedByMapper() {
|
||||
when(repository.warehouseOwned(TENANT, WAREHOUSE)).thenReturn(true);
|
||||
|
||||
Reference in New Issue
Block a user