mirror of https://github.com/Sonarr/Sonarr
Added test to validate season pack being grabbed when only one episode is monitored
Closes #1862
This commit is contained in:
parent
d726a7acb2
commit
cd8ae0d036
|
@ -137,5 +137,17 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
||||||
WithFirstEpisodeUnmonitored();
|
WithFirstEpisodeUnmonitored();
|
||||||
_monitoredEpisodeSpecification.IsSatisfiedBy(_parseResultSingle, new SingleEpisodeSearchCriteria{ MonitoredEpisodesOnly = true}).Accepted.Should().BeFalse();
|
_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
|
public class FullSeasonSpecification : IDecisionEngineSpecification
|
||||||
{
|
{
|
||||||
private readonly Logger _logger;
|
private readonly Logger _logger;
|
||||||
private readonly IEpisodeService _episodeService;
|
|
||||||
|
|
||||||
public FullSeasonSpecification(Logger logger, IEpisodeService episodeService)
|
public FullSeasonSpecification(Logger logger)
|
||||||
{
|
{
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_episodeService = episodeService;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public SpecificationPriority Priority => SpecificationPriority.Default;
|
public SpecificationPriority Priority => SpecificationPriority.Default;
|
||||||
|
|
Loading…
Reference in New Issue