feat(notification-outbox): additive NotificationId query filter for ?correlationId= deep links
Claude-Session: https://claude.ai/code/session_01NcMG6xXdsJbmD2wYAgkK29
This commit is contained in:
+34
@@ -115,6 +115,40 @@ public class NotificationOutboxActorQueryTests : TestKit
|
||||
Assert.Equal("site-1", staleSummary.SourceSiteId);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Query_WithNotificationIdFilter_PassesExactMatchToRepositoryFilter()
|
||||
{
|
||||
_repository.QueryAsync(
|
||||
Arg.Any<NotificationOutboxFilter>(), Arg.Any<int>(), Arg.Any<int>(), Arg.Any<CancellationToken>())
|
||||
.Returns(((IReadOnlyList<Notification>)Array.Empty<Notification>(), 0));
|
||||
var actor = CreateActor();
|
||||
|
||||
actor.Tell(
|
||||
new NotificationOutboxQueryRequest(
|
||||
CorrelationId: "corr-nid",
|
||||
StatusFilter: null,
|
||||
TypeFilter: null,
|
||||
SourceSiteFilter: null,
|
||||
ListNameFilter: null,
|
||||
StuckOnly: false,
|
||||
SubjectKeyword: null,
|
||||
From: null,
|
||||
To: null,
|
||||
PageNumber: 1,
|
||||
PageSize: 50,
|
||||
NotificationIdFilter: "abc"),
|
||||
TestActor);
|
||||
|
||||
var response = ExpectMsg<NotificationOutboxQueryResponse>();
|
||||
Assert.True(response.Success);
|
||||
|
||||
// The ?correlationId= deep link from the Flow Debugger / Audit Log rides through
|
||||
// to the repository as an exact-match NotificationId constraint.
|
||||
_repository.Received(1).QueryAsync(
|
||||
Arg.Is<NotificationOutboxFilter>(f => f.NotificationId == "abc"),
|
||||
1, 50, Arg.Any<CancellationToken>());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Query_WithStatusFilterString_ParsesToEnumOnFilter()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user