test(firstleg): cover printable pallet without nickname

This commit is contained in:
2026-09-20 15:57:51 +08:00
parent 0dec690235
commit cb008ad64d
2 changed files with 9 additions and 1 deletions
@@ -66,4 +66,12 @@ class IamCustomerSnapshotServiceTest {
assertThat(service.customerNickname(7L)).isEqualTo("Short Name");
}
@Test
void usesPlaceholderForPrintWhenCustomerNicknameIsMissing() {
when(client.page("internal-token", 1, 2, null, null, 7L))
.thenReturn(ApiResponse.success(new PageResult<>(List.of(), 1, 2, 0, 0)));
assertThat(service.customerNicknameForPrint(7L)).isEqualTo("—");
}
}
@@ -320,6 +320,6 @@ class InboundCartonLabelPrintServiceTest {
sku.setMaxUnitsPerCarton(19);
when(palletization.printSkuRows(palletId))
.thenReturn(palletId == 90001L ? List.of(sku) : List.of());
when(customerSnapshots.customerNickname(10001L)).thenReturn("小虫科技");
when(customerSnapshots.customerNicknameForPrint(10001L)).thenReturn("小虫科技");
}
}