feat(centralui): Bundle Import filter on ConfigurationAuditLog page
This commit is contained in:
@@ -353,6 +353,29 @@ public class CentralUiRepositoryTests : IDisposable
|
||||
Assert.Single(entries);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task GetAuditLogEntries_FiltersByBundleImportId()
|
||||
{
|
||||
// T24 — Bundle Import filter on the Configuration Audit Log page is
|
||||
// backed by the new optional bundleImportId arg on the repo query.
|
||||
// Only rows stamped with the given id should come back.
|
||||
var importA = Guid.NewGuid();
|
||||
var importB = Guid.NewGuid();
|
||||
_context.AuditLogEntries.AddRange(
|
||||
new AuditLogEntry("admin", "Create", "Template", "1", "T1")
|
||||
{ Timestamp = DateTimeOffset.UtcNow, BundleImportId = importA },
|
||||
new AuditLogEntry("admin", "Create", "Template", "2", "T2")
|
||||
{ Timestamp = DateTimeOffset.UtcNow, BundleImportId = importB },
|
||||
new AuditLogEntry("admin", "Update", "Template", "3", "T3")
|
||||
{ Timestamp = DateTimeOffset.UtcNow });
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
var (entries, total) = await _repository.GetAuditLogEntriesAsync(bundleImportId: importA);
|
||||
Assert.Single(entries);
|
||||
Assert.Equal(1, total);
|
||||
Assert.Equal(importA, entries[0].BundleImportId);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task GetAuditLogEntries_ReverseChronologicalWithPagination()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user