mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 05:13:18 -07:00
Added a notification model to the notifiers.
Added the backend work for sending a notification for an issue report #75
This commit is contained in:
parent
5b90fa9089
commit
0585ff73ec
11 changed files with 245 additions and 66 deletions
|
@ -97,7 +97,7 @@ namespace PlexRequests.Services.Tests
|
|||
{
|
||||
Assert.DoesNotThrow(
|
||||
() =>
|
||||
{ NotificationService.Publish(string.Empty, string.Empty); });
|
||||
{ NotificationService.Publish(new NotificationModel()); });
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -112,11 +112,11 @@ namespace PlexRequests.Services.Tests
|
|||
NotificationService.Subscribe(notificationMock2.Object);
|
||||
|
||||
Assert.That(NotificationService.Observers.Count, Is.EqualTo(2));
|
||||
var model = new NotificationModel {Title = "abc", Body = "test"};
|
||||
NotificationService.Publish(model);
|
||||
|
||||
NotificationService.Publish("a","b");
|
||||
|
||||
notificationMock1.Verify(x => x.Notify("a","b"), Times.Once);
|
||||
notificationMock2.Verify(x => x.Notify("a","b"), Times.Once);
|
||||
notificationMock1.Verify(x => x.Notify(model), Times.Once);
|
||||
notificationMock2.Verify(x => x.Notify(model), Times.Once);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue