1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 23:52:50 -05:00

PM-10564: Notification create push notification simplification.

NotificationStatus not needed.
This commit is contained in:
Maciej Zieniuk
2024-11-21 22:43:14 +00:00
parent 01c814595e
commit 3885885d5f
12 changed files with 63 additions and 108 deletions

View File

@ -14,22 +14,17 @@ namespace Bit.Core.Test.Services;
public class MultiServicePushNotificationServiceTests
{
[Theory]
[BitAutoData(false)]
[BitAutoData(true)]
[BitAutoData]
[NotificationCustomize]
[NotificationStatusCustomize]
public async Task PushSyncNotificationCreateAsync_Notification_Sent(bool notificationStatusNull,
SutProvider<MultiServicePushNotificationService> sutProvider, Notification notification,
NotificationStatus notificationStatus)
public async Task PushSyncNotificationCreateAsync_Notification_Sent(
SutProvider<MultiServicePushNotificationService> sutProvider, Notification notification)
{
await sutProvider.Sut.PushSyncNotificationCreateAsync(notification,
notificationStatusNull ? null : notificationStatus);
await sutProvider.Sut.PushSyncNotificationCreateAsync(notification);
var expectedNotificationStatus = notificationStatusNull ? null : notificationStatus;
await sutProvider.GetDependency<IEnumerable<IPushNotificationService>>()
.First()
.Received(1)
.PushSyncNotificationCreateAsync(notification, expectedNotificationStatus);
.PushSyncNotificationCreateAsync(notification);
}
[Theory]