Fixed broken tests.

pull/3113/head
Mark McDowall 12 years ago
parent d9d9027022
commit bd5ced1540

@ -52,6 +52,10 @@ namespace NzbDrone.Core.Test.ProviderTests.DecisionEngineTests
Mocker.GetMock<AllowedReleaseGroupSpecification>()
.Setup(c => c.IsSatisfiedBy(It.IsAny<EpisodeParseResult>()))
.Returns(true);
Mocker.GetMock<EpisodeAiredAfterCutoffSpecification>()
.Setup(c => c.IsSatisfiedBy(It.IsAny<EpisodeParseResult>()))
.Returns(true);
}
private void WithProfileNotAllowed()
@ -89,6 +93,13 @@ namespace NzbDrone.Core.Test.ProviderTests.DecisionEngineTests
.Returns(false);
}
private void WithAiredBeforeCutoff()
{
Mocker.GetMock<EpisodeAiredAfterCutoffSpecification>()
.Setup(c => c.IsSatisfiedBy(It.IsAny<EpisodeParseResult>()))
.Returns(false);
}
[Test]
public void should_be_allowed_if_all_conditions_are_met()
{
@ -130,6 +141,13 @@ namespace NzbDrone.Core.Test.ProviderTests.DecisionEngineTests
spec.IsSatisfiedBy(parseResult).Should().Be(ReportRejectionType.Retention);
}
[Test]
public void should_not_be_allowed_if_episode_aired_before_cutoff()
{
WithAiredBeforeCutoff();
spec.IsSatisfiedBy(parseResult).Should().Be(ReportRejectionType.EpisodeAiredBeforeCutoff);
}
[Test]
public void should_not_be_allowed_if_none_of_conditions_are_met()
{

Loading…
Cancel
Save