mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
cleaned up nzb download clients.
This commit is contained in:
@@ -61,14 +61,14 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.SabProviderTests
|
||||
.Returns("{ \"status\": true }");
|
||||
|
||||
|
||||
Subject.DownloadNzb(_remoteEpisode).Should().BeTrue();
|
||||
Subject.DownloadNzb(_remoteEpisode);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void add_by_url_should_detect_and_handle_sab_errors()
|
||||
{
|
||||
WithFailResponse();
|
||||
Assert.Throws<ApplicationException>(() => Subject.DownloadNzb(_remoteEpisode).Should().BeFalse());
|
||||
Assert.Throws<ApplicationException>(() => Subject.DownloadNzb(_remoteEpisode));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -197,13 +197,12 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.SabProviderTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_return_false_when_WebException_is_thrown()
|
||||
public void should_throw_when_WebException_is_thrown()
|
||||
{
|
||||
Mocker.GetMock<IHttpProvider>()
|
||||
.Setup(s => s.DownloadString(It.IsAny<String>())).Throws(new WebException());
|
||||
|
||||
Subject.DownloadNzb(_remoteEpisode).Should().BeFalse();
|
||||
ExceptionVerification.ExpectedErrors(1);
|
||||
Assert.Throws<WebException>(() => Subject.DownloadNzb(_remoteEpisode));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -219,7 +218,7 @@ namespace NzbDrone.Core.Test.Download.DownloadClientTests.SabProviderTests
|
||||
.Returns("{ \"status\": true }");
|
||||
|
||||
|
||||
Subject.DownloadNzb(_remoteEpisode).Should().BeTrue();
|
||||
Subject.DownloadNzb(_remoteEpisode);
|
||||
|
||||
Mocker.GetMock<IHttpProvider>()
|
||||
.Verify(v => v.DownloadString("http://192.168.5.55:2222/api?mode=addurl&name=http://www.nzbclub.com/nzb_download.aspx?mid=1950232&priority=1&pp=3&cat=tv&nzbname=My+Series+Name+-+5x2-5x3+-+My+title+%5bBluray720p%5d+%5bProper%5d&output=json&apikey=5c770e3197e4fe763423ee7c392c25d1&ma_username=admin&ma_password=pass"), Times.Once());
|
||||
|
Reference in New Issue
Block a user