mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-24 16:51:58 +00:00
Fixed broken tests.
This commit is contained in:
parent
d9d9027022
commit
bd5ced1540
1 changed files with 18 additions and 0 deletions
|
@ -52,6 +52,10 @@ public void Setup()
|
||||||
Mocker.GetMock<AllowedReleaseGroupSpecification>()
|
Mocker.GetMock<AllowedReleaseGroupSpecification>()
|
||||||
.Setup(c => c.IsSatisfiedBy(It.IsAny<EpisodeParseResult>()))
|
.Setup(c => c.IsSatisfiedBy(It.IsAny<EpisodeParseResult>()))
|
||||||
.Returns(true);
|
.Returns(true);
|
||||||
|
|
||||||
|
Mocker.GetMock<EpisodeAiredAfterCutoffSpecification>()
|
||||||
|
.Setup(c => c.IsSatisfiedBy(It.IsAny<EpisodeParseResult>()))
|
||||||
|
.Returns(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void WithProfileNotAllowed()
|
private void WithProfileNotAllowed()
|
||||||
|
@ -89,6 +93,13 @@ private void WithOverRetention()
|
||||||
.Returns(false);
|
.Returns(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void WithAiredBeforeCutoff()
|
||||||
|
{
|
||||||
|
Mocker.GetMock<EpisodeAiredAfterCutoffSpecification>()
|
||||||
|
.Setup(c => c.IsSatisfiedBy(It.IsAny<EpisodeParseResult>()))
|
||||||
|
.Returns(false);
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void should_be_allowed_if_all_conditions_are_met()
|
public void should_be_allowed_if_all_conditions_are_met()
|
||||||
{
|
{
|
||||||
|
@ -130,6 +141,13 @@ public void should_not_be_allowed_if_report_is_over_retention()
|
||||||
spec.IsSatisfiedBy(parseResult).Should().Be(ReportRejectionType.Retention);
|
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]
|
[Test]
|
||||||
public void should_not_be_allowed_if_none_of_conditions_are_met()
|
public void should_not_be_allowed_if_none_of_conditions_are_met()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue