mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-30 11:48:26 -07:00
checking for existing files to import is now case insensitive.
This commit is contained in:
parent
c13195046d
commit
e377e02db4
8 changed files with 30 additions and 191 deletions
|
@ -80,5 +80,30 @@ namespace NzbDrone.Core.Test.MediaFileTests
|
|||
Subject.FilterExistingFiles(files, 10).Should().HaveCount(2);
|
||||
Subject.FilterExistingFiles(files, 10).Should().NotContain("c:\\file2.avi".AsOsAgnostic());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
[Test]
|
||||
public void filter_should_return_none_existing_files_ignoring_case()
|
||||
{
|
||||
var files = new List<string>()
|
||||
{
|
||||
"c:\\file1.avi".AsOsAgnostic(),
|
||||
"c:\\FILE2.avi".AsOsAgnostic(),
|
||||
"c:\\file3.avi".AsOsAgnostic()
|
||||
};
|
||||
|
||||
Mocker.GetMock<IMediaFileRepository>()
|
||||
.Setup(c => c.GetFilesBySeries(It.IsAny<int>()))
|
||||
.Returns(new List<EpisodeFile>
|
||||
{
|
||||
new EpisodeFile{Path = "c:\\file2.avi".AsOsAgnostic()}
|
||||
});
|
||||
|
||||
|
||||
Subject.FilterExistingFiles(files, 10).Should().HaveCount(2);
|
||||
Subject.FilterExistingFiles(files, 10).Should().NotContain("c:\\file2.avi".AsOsAgnostic());
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue