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

Closes #1862
pull/192/merge
Mark McDowall 8 years ago
parent d726a7acb2
commit cd8ae0d036
No known key found for this signature in database
GPG Key ID: D4CEFA9A718052E0

@ -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();
}
}
}

@ -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;

Loading…
Cancel
Save