Beispiel #1
0
        public IActionResult AcknowledgeNotification(int systemNotificationId, int page)
        {
            var adminId = User.GetAdminId() !.Value;

            systemNotificationsDataService.AcknowledgeNotification(systemNotificationId, adminId);

            return(RedirectToAction("Index", "SystemNotifications", new { page }));
        }
Beispiel #2
0
        public void Post_acknowledges_notification_and_redirects()
        {
            // When
            var result = controller.AcknowledgeNotification(1, 1);

            // Then
            using (new AssertionScope())
            {
                A.CallTo(() => systemNotificationsDataService.AcknowledgeNotification(1, 7)).MustHaveHappened();
                result.Should().BeRedirectToActionResult().WithControllerName("SystemNotifications")
                .WithActionName("Index");
            }
        }