Fixed: Use folder quality when better than file quality (regression)

Closes #1022
This commit is contained in:
Mark McDowall
2016-01-04 23:11:06 -08:00
parent 376481eda5
commit b62ef0c40c
2 changed files with 42 additions and 1 deletions
@@ -207,6 +207,22 @@ namespace NzbDrone.Core.Test.MediaFiles.EpisodeImport
result.Single().LocalEpisode.Quality.Should().Be(expectedQuality);
}
[Test]
public void should_use_folder_quality_when_greater_than_file_quality()
{
GivenSpecifications(_pass1, _pass2, _pass3);
GivenVideoFiles(new string[] { @"C:\Test\Unsorted\The.Office.S03E115.mkv".AsOsAgnostic() });
_localEpisode.Path = _videoFiles.Single();
_localEpisode.Quality.Quality = Quality.HDTV720p;
var expectedQuality = new QualityModel(Quality.Bluray720p);
var result = Subject.GetImportDecisions(_videoFiles, _series, new ParsedEpisodeInfo { Quality = expectedQuality }, true);
result.Single().LocalEpisode.Quality.Should().Be(expectedQuality);
}
[Test]
public void should_not_throw_if_episodes_are_not_found()
{