Added test to validate season pack being grabbed when only one episode is monitored

Closes #1862
This commit is contained in:
Mark McDowall 2017-04-28 17:37:18 -07:00
parent d726a7acb2
commit cd8ae0d036
No known key found for this signature in database
GPG Key ID: D4CEFA9A718052E0
2 changed files with 13 additions and 3 deletions

View File

@ -137,5 +137,17 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
WithFirstEpisodeUnmonitored();
_monitoredEpisodeSpecification.IsSatisfiedBy(_parseResultSingle, new SingleEpisodeSearchCriteria{ MonitoredEpisodesOnly = true}).Accepted.Should().BeFalse();
}
[Test]
public void should_return_false_if_all_episodes_are_not_monitored_for_season_pack_release()
{
WithSecondEpisodeUnmonitored();
_parseResultMulti.ParsedEpisodeInfo = new ParsedEpisodeInfo
{
FullSeason = true
};
_monitoredEpisodeSpecification.IsSatisfiedBy(_parseResultMulti, null).Accepted.Should().BeFalse();
}
}
}

View File

@ -11,12 +11,10 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
public class FullSeasonSpecification : IDecisionEngineSpecification
{
private readonly Logger _logger;
private readonly IEpisodeService _episodeService;
public FullSeasonSpecification(Logger logger, IEpisodeService episodeService)
public FullSeasonSpecification(Logger logger)
{
_logger = logger;
_episodeService = episodeService;
}
public SpecificationPriority Priority => SpecificationPriority.Default;