mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-13 02:07:12 -07:00
parent
6cfb54030b
commit
c4cf178144
2 changed files with 13 additions and 2 deletions
|
@ -283,6 +283,19 @@ namespace NzbDrone.Core.Test.Download
|
||||||
AssertImportIncomplete();
|
AssertImportIncomplete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void should_not_mark_as_failed_if_nothing_found_to_import()
|
||||||
|
{
|
||||||
|
Mocker.GetMock<IDownloadedTracksImportService>()
|
||||||
|
.Setup(v => v.ProcessPath(It.IsAny<string>(), It.IsAny<ImportMode>(), It.IsAny<Artist>(), It.IsAny<DownloadClientItem>()))
|
||||||
|
.Returns(new List<ImportResult>());
|
||||||
|
|
||||||
|
Subject.Process(_trackedDownload);
|
||||||
|
|
||||||
|
AssertNoCompletedDownload();
|
||||||
|
_trackedDownload.State.Should().NotBe(TrackedDownloadStage.ImportFailed);
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void should_not_mark_as_imported_if_all_files_were_skipped()
|
public void should_not_mark_as_imported_if_all_files_were_skipped()
|
||||||
{
|
{
|
||||||
|
|
|
@ -108,9 +108,7 @@ namespace NzbDrone.Core.Download
|
||||||
|
|
||||||
if (importResults.Empty())
|
if (importResults.Empty())
|
||||||
{
|
{
|
||||||
trackedDownload.State = TrackedDownloadStage.ImportFailed;
|
|
||||||
trackedDownload.Warn("No files found are eligible for import in {0}", outputPath);
|
trackedDownload.Warn("No files found are eligible for import in {0}", outputPath);
|
||||||
_eventAggregator.PublishEvent(new AlbumImportIncompleteEvent(trackedDownload));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue