feat(notifications): Phase B backend — per-user channel preferences
This commit is contained in:
+9
@@ -75,6 +75,14 @@ class NotificationsDispatcherTest {
|
||||
notificationLogRepository = new StubNotificationLogRepository();
|
||||
idempotencyGuard = new StubIdempotencyGuard(notificationLogRepository);
|
||||
|
||||
// Phase B: UserPreferencesGate — stub all-allow для existing tests (no
|
||||
// prefs row → defaults apply, email ON). Per-channel skip tested separately.
|
||||
UserPreferencesGate allAllowGate = new UserPreferencesGate(null) {
|
||||
@Override
|
||||
public boolean allows(String userId, cloud.nstart.terravault.ordinis.notifications.channel.ChannelKind channel) {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
dispatcher = new NotificationsDispatcher(
|
||||
outboxRepository,
|
||||
notificationLogRepository,
|
||||
@@ -82,6 +90,7 @@ class NotificationsDispatcherTest {
|
||||
messageRenderer,
|
||||
List.of(emailChannel),
|
||||
recipientResolver,
|
||||
allAllowGate,
|
||||
new SimpleMeterRegistry()
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user