1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-20 21:54:58 -04:00

Fixed: Exclude OS X Metadata files when scanning for files

Fixes #533
This commit is contained in:
Mark McDowall
2015-05-11 17:23:55 -07:00
parent 6e7a2af86b
commit c3acfe34fe
2 changed files with 24 additions and 3 deletions
@@ -27,6 +27,11 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
@"C:\Test\movie"
};
GivenFiles();
}
private void GivenFiles()
{
Mocker.GetMock<IDiskProvider>()
.Setup(s => s.GetFiles(It.IsAny<String>(), SearchOption.AllDirectories))
.Returns(_files);
@@ -69,8 +74,20 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
public void should_return_video_files_only()
{
var path = @"C:\Test\";
var test = Subject.GetVideoFiles(path);
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);
}
}
}