mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 16:12:49 -05:00
PM-10564: CreateNotificationStatusCommand sends wrong create push event type.
Any update to the Notification from user perspective should be treated as update. That includes NotificationStatus, which when created would be displayed as update to the notification. Hence, push notification should be update type.
This commit is contained in:
@ -53,7 +53,7 @@ public class CreateNotificationStatusCommandTest
|
||||
await Assert.ThrowsAsync<NotFoundException>(() => sutProvider.Sut.CreateAsync(notificationStatus));
|
||||
await sutProvider.GetDependency<IPushNotificationService>()
|
||||
.Received(0)
|
||||
.PushSyncNotificationCreateAsync(Arg.Any<Notification>(), Arg.Any<NotificationStatus?>());
|
||||
.PushSyncNotificationUpdateAsync(Arg.Any<Notification>(), Arg.Any<NotificationStatus?>());
|
||||
}
|
||||
|
||||
[Theory]
|
||||
@ -67,7 +67,7 @@ public class CreateNotificationStatusCommandTest
|
||||
await Assert.ThrowsAsync<NotFoundException>(() => sutProvider.Sut.CreateAsync(notificationStatus));
|
||||
await sutProvider.GetDependency<IPushNotificationService>()
|
||||
.Received(0)
|
||||
.PushSyncNotificationCreateAsync(Arg.Any<Notification>(), Arg.Any<NotificationStatus?>());
|
||||
.PushSyncNotificationUpdateAsync(Arg.Any<Notification>(), Arg.Any<NotificationStatus?>());
|
||||
}
|
||||
|
||||
[Theory]
|
||||
@ -81,7 +81,7 @@ public class CreateNotificationStatusCommandTest
|
||||
await Assert.ThrowsAsync<NotFoundException>(() => sutProvider.Sut.CreateAsync(notificationStatus));
|
||||
await sutProvider.GetDependency<IPushNotificationService>()
|
||||
.Received(0)
|
||||
.PushSyncNotificationCreateAsync(Arg.Any<Notification>(), Arg.Any<NotificationStatus?>());
|
||||
.PushSyncNotificationUpdateAsync(Arg.Any<Notification>(), Arg.Any<NotificationStatus?>());
|
||||
}
|
||||
|
||||
[Theory]
|
||||
@ -97,6 +97,6 @@ public class CreateNotificationStatusCommandTest
|
||||
Assert.Equal(notificationStatus, newNotificationStatus);
|
||||
await sutProvider.GetDependency<IPushNotificationService>()
|
||||
.Received(1)
|
||||
.PushSyncNotificationCreateAsync(notification, notificationStatus);
|
||||
.PushSyncNotificationUpdateAsync(notification, notificationStatus);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user