Test #12

Merged
admin merged 27 commits from test into main 2026-09-20 19:48:44 +08:00
2 changed files with 9 additions and 1 deletions
Showing only changes of commit cb008ad64d - Show all commits
@@ -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("小虫科技");
}
}