This commit is contained in:
2026-08-14 13:03:09 +08:00
parent ce6963a25e
commit 06c264db0a
7 changed files with 32 additions and 7 deletions
@@ -44,12 +44,13 @@ class InternalCustomerExportContractTest {
@Test
void exposesFinanceCustomerMasterDataOnlyWithInternalToken() {
BizException denied = assertThrows(BizException.class,
() -> controller.financeCustomers(null, 1, 20, "Alice", "ACTIVE"));
() -> controller.financeCustomers(null, 1, 20, "Alice", "ACTIVE", null));
assertEquals(ResultCode.FORBIDDEN, denied.getResultCode());
when(service.pageFinanceCustomers(1, 20, "Alice", "ACTIVE", null))
.thenReturn(new com.baiyue.common.core.api.PageResult<>(List.of(), 1, 20, 0, 0));
var response = controller.financeCustomers("test-internal-service-token-at-least-32-bytes", 1, 20, "Alice", "ACTIVE");
var response = controller.financeCustomers("test-internal-service-token-at-least-32-bytes", 1, 20,
"Alice", "ACTIVE", null);
assertEquals(ResultCode.SUCCESS.code(), response.code());
verify(service).pageFinanceCustomers(1, 20, "Alice", "ACTIVE", null);
}