优化
This commit is contained in:
@@ -45,6 +45,19 @@ class AuditLogQueryServiceTest {
|
||||
.doesNotContain("beforeData", "afterData");
|
||||
}
|
||||
|
||||
@Test
|
||||
void pagePreservesTotalAndPagesForCustomerLogPagination() {
|
||||
AuditLogQuery query = new AuditLogQuery(10001L, null, null, "TENANT", null, null,
|
||||
null, null, null);
|
||||
when(repository.page(query, 1, 20)).thenReturn(new PageResult<>(List.of(log(8L)), 1, 20, 13, 1));
|
||||
|
||||
PageResult<AuditLogResponses.ListItem> result = service.page(query, 1, 20);
|
||||
|
||||
assertThat(result.records()).hasSize(1);
|
||||
assertThat(result.total()).isEqualTo(13);
|
||||
assertThat(result.pages()).isEqualTo(1);
|
||||
}
|
||||
|
||||
@Test
|
||||
void detailReturnsSanitizedSnapshots() {
|
||||
when(repository.findById(8L)).thenReturn(log(8L));
|
||||
|
||||
Reference in New Issue
Block a user