mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-26 22:46:37 -04:00
Don't try to process a download client item with an invalid path for the OS
This commit is contained in:
@@ -381,6 +381,30 @@ namespace NzbDrone.Core.Test.Download
|
||||
AssertCompletedDownload();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_warn_if_path_is_not_valid_for_windows()
|
||||
{
|
||||
WindowsOnly();
|
||||
|
||||
_trackedDownload.DownloadItem.OutputPath = new OsPath(@"/invalid/Windows/Path");
|
||||
|
||||
Subject.Process(_trackedDownload);
|
||||
|
||||
AssertNoAttemptedImport();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_warn_if_path_is_not_valid_for_linux()
|
||||
{
|
||||
MonoOnly();
|
||||
|
||||
_trackedDownload.DownloadItem.OutputPath = new OsPath(@"C:\Invalid\Mono\Path");
|
||||
|
||||
Subject.Process(_trackedDownload);
|
||||
|
||||
AssertNoAttemptedImport();
|
||||
}
|
||||
|
||||
private void AssertNoAttemptedImport()
|
||||
{
|
||||
Mocker.GetMock<IDownloadedEpisodesImportService>()
|
||||
|
||||
Reference in New Issue
Block a user