mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-22 22:14:44 -04:00
Fixed: Don't attempt to fetch a release if the download client is disabled
This commit is contained in:
@@ -180,7 +180,7 @@ namespace NzbDrone.Core.Test.Download
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_not_attempt_download_if_client_isnt_configure()
|
||||
public void should_not_attempt_download_if_client_isnt_configured()
|
||||
{
|
||||
Assert.Throws<DownloadClientUnavailableException>(() => Subject.DownloadReport(_parseResult));
|
||||
|
||||
@@ -188,6 +188,21 @@ namespace NzbDrone.Core.Test.Download
|
||||
VerifyEventNotPublished<AlbumGrabbedEvent>();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_not_attempt_download_if_client_is_disabled()
|
||||
{
|
||||
WithUsenetClient();
|
||||
|
||||
Mocker.GetMock<IDownloadClientStatusService>()
|
||||
.Setup(v => v.IsDisabled(It.IsAny<int>()))
|
||||
.Returns(true);
|
||||
|
||||
Assert.Throws<DownloadClientUnavailableException>(() => Subject.DownloadReport(_parseResult));
|
||||
|
||||
Mocker.GetMock<IDownloadClient>().Verify(c => c.Download(It.IsAny<RemoteAlbum>()), Times.Never());
|
||||
VerifyEventNotPublished<AlbumGrabbedEvent>();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_send_download_to_correct_usenet_client()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user