优化
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user