mirror of https://github.com/Sonarr/Sonarr
Fix tests
This commit is contained in:
parent
57bcc9f4c1
commit
f88e2e2b79
|
@ -233,7 +233,6 @@ namespace NzbDrone.Core.Test.MediaFiles.DiskScanServiceTests
|
||||||
public void should_find_files_at_root_of_series_folder()
|
public void should_find_files_at_root_of_series_folder()
|
||||||
{
|
{
|
||||||
GivenParentFolderExists();
|
GivenParentFolderExists();
|
||||||
_series.Path = @"C:\Test\TV\.hack".AsOsAgnostic();
|
|
||||||
|
|
||||||
GivenFiles(new List<string>
|
GivenFiles(new List<string>
|
||||||
{
|
{
|
||||||
|
@ -246,5 +245,22 @@ namespace NzbDrone.Core.Test.MediaFiles.DiskScanServiceTests
|
||||||
Mocker.GetMock<IMakeImportDecision>()
|
Mocker.GetMock<IMakeImportDecision>()
|
||||||
.Verify(v => v.GetImportDecisions(It.Is<List<string>>(l => l.Count == 2), _series), Times.Once());
|
.Verify(v => v.GetImportDecisions(It.Is<List<string>>(l => l.Count == 2), _series), Times.Once());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void should_exclude_osx_metadata_files()
|
||||||
|
{
|
||||||
|
GivenParentFolderExists();
|
||||||
|
|
||||||
|
GivenFiles(new List<string>
|
||||||
|
{
|
||||||
|
Path.Combine(_series.Path, "._24 The Status Quo Combustion.mp4").AsOsAgnostic(),
|
||||||
|
Path.Combine(_series.Path, "24 The Status Quo Combustion.mkv").AsOsAgnostic()
|
||||||
|
});
|
||||||
|
|
||||||
|
Subject.Scan(_series);
|
||||||
|
|
||||||
|
Mocker.GetMock<IMakeImportDecision>()
|
||||||
|
.Verify(v => v.GetImportDecisions(It.Is<List<string>>(l => l.Count == 1), _series), Times.Once());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,17 +77,5 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
||||||
|
|
||||||
Subject.GetVideoFiles(path).Should().HaveCount(4);
|
Subject.GetVideoFiles(path).Should().HaveCount(4);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void should_exclude_osx_metadata_files()
|
|
||||||
{
|
|
||||||
var path = @"C:\Test\";
|
|
||||||
|
|
||||||
_files = new [] { "._24 The Status Quo Combustion.mp4", "24 The Status Quo Combustion.mp4" };
|
|
||||||
|
|
||||||
GivenFiles();
|
|
||||||
|
|
||||||
Subject.GetVideoFiles(path).Should().HaveCount(1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue