mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
Indexer settings overhaul, reviewed settings tooltips
This commit is contained in:
parent
d60b863e14
commit
5baf2e09c4
24 changed files with 132 additions and 55 deletions
|
@ -0,0 +1,53 @@
|
|||
using FluentAssertions;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Core.Configuration;
|
||||
using NzbDrone.Core.DecisionEngine.Specifications;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
|
||||
namespace NzbDrone.Core.Test.DecisionEngineTests
|
||||
{
|
||||
[TestFixture]
|
||||
public class NotRestrictedReleaseSpecificationFixture : CoreTest<NotRestrictedReleaseSpecification>
|
||||
{
|
||||
private RemoteEpisode _parseResult;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
_parseResult = new RemoteEpisode
|
||||
{
|
||||
Report = new ReportInfo
|
||||
{
|
||||
Title = "Dexter.S08E01.EDITED.WEBRip.x264-KYR"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_be_true_when_restrictions_are_empty()
|
||||
{
|
||||
Subject.IsSatisfiedBy(_parseResult).Should().BeTrue();
|
||||
}
|
||||
|
||||
[TestCase("KYR")]
|
||||
[TestCase("EDITED")]
|
||||
[TestCase("edited")]
|
||||
[TestCase("2HD\nKYR")]
|
||||
[TestCase("2HD\nkyr")]
|
||||
public void should_be_false_when_nzb_contains_a_restricted_term(string restrictions)
|
||||
{
|
||||
Mocker.GetMock<IConfigService>().SetupGet(c => c.ReleaseRestrictions).Returns(restrictions);
|
||||
Subject.IsSatisfiedBy(_parseResult).Should().BeFalse();
|
||||
}
|
||||
|
||||
[TestCase("NotReal")]
|
||||
[TestCase("LoL")]
|
||||
[TestCase("Hello\nWorld")]
|
||||
public void should_be_true_when_nzb_does_not_contain_a_restricted_term(string restrictions)
|
||||
{
|
||||
Mocker.GetMock<IConfigService>().SetupGet(c => c.ReleaseRestrictions).Returns(restrictions);
|
||||
Subject.IsSatisfiedBy(_parseResult).Should().BeTrue();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue