Fixed issue with create series directory on import
This commit is contained in:
parent
0d4bda1e1e
commit
d6ad5ebb36
|
@ -425,11 +425,20 @@ namespace NzbDrone.Core.Test.ProviderTests.PostDownloadProviderTests
|
|||
var downloadName = new DirectoryInfo(@"C:\Test\Drop\30.Rock.S01E01.Pilot");
|
||||
|
||||
WithValidSeries();
|
||||
WithLotsOfFreeDiskSpace();
|
||||
WithImportedFiles(downloadName.FullName);
|
||||
|
||||
Mocker.GetMock<DiskProvider>()
|
||||
.Setup(s => s.FolderExists(fakeSeries.Path))
|
||||
.Returns(false);
|
||||
|
||||
Mocker.GetMock<SeriesProvider>().Setup(s => s.FindSeries("office")).Returns(fakeSeries);
|
||||
Mocker.GetMock<DiskScanProvider>().Setup(s => s.CleanUpDropFolder(downloadName.FullName));
|
||||
Mocker.GetMock<DiskScanProvider>().Setup(s => s.MoveEpisodeFile(It.IsAny<EpisodeFile>(), true)).Returns(new EpisodeFile());
|
||||
Mocker.GetMock<DiskProvider>().Setup(s => s.GetDirectorySize(downloadName.FullName)).Returns(Constants.IgnoreFileSize - 1.Megabytes());
|
||||
Mocker.GetMock<DiskProvider>().Setup(s => s.DeleteFolder(downloadName.FullName, true));
|
||||
Mocker.GetMock<DiskProvider>().Setup(s => s.IsFolderLocked(downloadName.FullName)).Returns(false);
|
||||
|
||||
Mocker.Resolve<PostDownloadProvider>().ProcessDownload(downloadName);
|
||||
|
||||
Mocker.GetMock<DiskProvider>().Verify(c => c.CreateDirectory(fakeSeries.Path), Times.Once());
|
||||
|
|
|
@ -89,7 +89,6 @@ namespace NzbDrone.Core.Providers
|
|||
{
|
||||
Logger.Warn("Series Folder doesn't exist: {0}, creating it.", series.Path);
|
||||
_diskProvider.CreateDirectory(series.Path);
|
||||
return;
|
||||
}
|
||||
|
||||
var size = _diskProvider.GetDirectorySize(subfolderInfo.FullName);
|
||||
|
|
Loading…
Reference in New Issue