mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Notifications can be tested
Notification ImplementationType was added for showing in UI (Humanized/Title cased of Implementation)
This commit is contained in:
@@ -42,8 +42,7 @@ namespace NzbDrone.Core.Test.NotificationTests
|
||||
Mocker.GetMock<IHttpProvider>().Setup(s => s.DownloadStream("http://localhost:32400/library/sections", null))
|
||||
.Returns(stream);
|
||||
|
||||
|
||||
var result = Mocker.Resolve<PlexProvider>().GetSectionKeys("localhost:32400");
|
||||
var result = Mocker.Resolve<PlexService>().GetSectionKeys(new PlexServerSettings { Host = "localhost", Port = 32400 });
|
||||
|
||||
|
||||
result.Should().HaveCount(1);
|
||||
@@ -62,7 +61,7 @@ namespace NzbDrone.Core.Test.NotificationTests
|
||||
.Returns(stream);
|
||||
|
||||
|
||||
var result = Mocker.Resolve<PlexProvider>().GetSectionKeys("localhost:32400");
|
||||
var result = Mocker.Resolve<PlexService>().GetSectionKeys(new PlexServerSettings { Host = "localhost", Port = 32400 });
|
||||
|
||||
|
||||
result.Should().HaveCount(1);
|
||||
@@ -80,8 +79,8 @@ namespace NzbDrone.Core.Test.NotificationTests
|
||||
Mocker.GetMock<IHttpProvider>().Setup(s => s.DownloadStream("http://localhost:32400/library/sections", null))
|
||||
.Returns(stream);
|
||||
|
||||
|
||||
var result = Mocker.Resolve<PlexProvider>().GetSectionKeys("localhost:32400");
|
||||
|
||||
var result = Mocker.Resolve<PlexService>().GetSectionKeys(new PlexServerSettings { Host = "localhost", Port = 32400 });
|
||||
|
||||
|
||||
result.Should().HaveCount(2);
|
||||
@@ -100,8 +99,8 @@ namespace NzbDrone.Core.Test.NotificationTests
|
||||
Mocker.GetMock<IHttpProvider>().Setup(s => s.DownloadString("http://localhost:32400/library/sections/5/refresh"))
|
||||
.Returns(response);
|
||||
|
||||
|
||||
Mocker.Resolve<PlexProvider>().UpdateSection("localhost:32400", 5);
|
||||
|
||||
Mocker.Resolve<PlexService>().UpdateSection(new PlexServerSettings { Host = "localhost", Port = 32400 }, 5);
|
||||
|
||||
|
||||
|
||||
@@ -121,7 +120,7 @@ namespace NzbDrone.Core.Test.NotificationTests
|
||||
.Returns("ok");
|
||||
|
||||
|
||||
Mocker.Resolve<PlexProvider>().Notify(_clientSettings, header, message);
|
||||
Mocker.Resolve<PlexService>().Notify(_clientSettings, header, message);
|
||||
|
||||
|
||||
fakeHttp.Verify(v => v.DownloadString(expectedUrl), Times.Once());
|
||||
@@ -142,7 +141,7 @@ namespace NzbDrone.Core.Test.NotificationTests
|
||||
.Returns("ok");
|
||||
|
||||
|
||||
Mocker.Resolve<PlexProvider>().Notify(_clientSettings, header, message);
|
||||
Mocker.Resolve<PlexService>().Notify(_clientSettings, header, message);
|
||||
|
||||
|
||||
fakeHttp.Verify(v => v.DownloadString(expectedUrl, "plex", "plex"), Times.Once());
|
||||
|
Reference in New Issue
Block a user