mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-18 21:35:51 -04:00
FreeSpaceSpec will return true is free space check returns null
This commit is contained in:
+13
-3
@@ -123,14 +123,24 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Specifications
|
||||
[Test]
|
||||
public void should_skip_check_for_files_under_series_folder()
|
||||
{
|
||||
Mocker.GetMock<IDiskProvider>()
|
||||
.Setup(s => s.IsParent(It.IsAny<String>(), It.IsAny<String>()))
|
||||
.Returns(true);
|
||||
_localEpisode.ExistingFile = true;
|
||||
|
||||
Subject.IsSatisfiedBy(_localEpisode).Should().BeTrue();
|
||||
|
||||
Mocker.GetMock<IDiskProvider>()
|
||||
.Verify(s => s.GetAvailableSpace(It.IsAny<String>()), Times.Never());
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_return_true_if_free_space_is_null()
|
||||
{
|
||||
long? freeSpace = null;
|
||||
|
||||
Mocker.GetMock<IDiskProvider>()
|
||||
.Setup(s => s.GetAvailableSpace(It.IsAny<String>()))
|
||||
.Returns(freeSpace);
|
||||
|
||||
Subject.IsSatisfiedBy(_localEpisode).Should().BeTrue();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-3
@@ -29,9 +29,7 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport.Specifications
|
||||
|
||||
private void GivenChildOfSeries()
|
||||
{
|
||||
Mocker.GetMock<IDiskProvider>()
|
||||
.Setup(s => s.IsParent(_localEpisode.Series.Path, _localEpisode.Path))
|
||||
.Returns(true);
|
||||
_localEpisode.ExistingFile = true;
|
||||
}
|
||||
|
||||
private void GivenNewFile()
|
||||
|
||||
Reference in New Issue
Block a user