mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-22 22:14:44 -04:00
Reject non-english releases
NzbDrone, now with more rejection built in
This commit is contained in:
+19
@@ -56,6 +56,10 @@ namespace NzbDrone.Core.Test.ProviderTests.DecisionEngineTests
|
||||
Mocker.GetMock<CustomStartDateSpecification>()
|
||||
.Setup(c => c.IsSatisfiedBy(It.IsAny<EpisodeParseResult>()))
|
||||
.Returns(true);
|
||||
|
||||
Mocker.GetMock<LanguageSpecification>()
|
||||
.Setup(c => c.IsSatisfiedBy(It.IsAny<EpisodeParseResult>()))
|
||||
.Returns(true);
|
||||
}
|
||||
|
||||
private void WithProfileNotAllowed()
|
||||
@@ -100,6 +104,13 @@ namespace NzbDrone.Core.Test.ProviderTests.DecisionEngineTests
|
||||
.Returns(false);
|
||||
}
|
||||
|
||||
private void WithLanguageNotWanted()
|
||||
{
|
||||
Mocker.GetMock<LanguageSpecification>()
|
||||
.Setup(c => c.IsSatisfiedBy(It.IsAny<EpisodeParseResult>()))
|
||||
.Returns(false);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_be_allowed_if_all_conditions_are_met()
|
||||
{
|
||||
@@ -158,5 +169,13 @@ namespace NzbDrone.Core.Test.ProviderTests.DecisionEngineTests
|
||||
|
||||
spec.IsSatisfiedBy(parseResult).Should().Be(ReportRejectionType.QualityNotWanted);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_not_be_allowed_if_language_is_not_wanted()
|
||||
{
|
||||
WithLanguageNotWanted();
|
||||
|
||||
spec.IsSatisfiedBy(parseResult).Should().Be(ReportRejectionType.LanguageNotWanted);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user