From 6b4259757c519c4c18a4efa574f8443e78006d08 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Fri, 20 Dec 2024 20:22:14 +0200 Subject: [PATCH] Add test for do not prefer repacks/propers --- .../UpgradeSpecificationFixture.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/NzbDrone.Core.Test/DecisionEngineTests/UpgradeSpecificationFixture.cs b/src/NzbDrone.Core.Test/DecisionEngineTests/UpgradeSpecificationFixture.cs index f9de729b0..6b8b9beee 100644 --- a/src/NzbDrone.Core.Test/DecisionEngineTests/UpgradeSpecificationFixture.cs +++ b/src/NzbDrone.Core.Test/DecisionEngineTests/UpgradeSpecificationFixture.cs @@ -107,6 +107,25 @@ public void should_return_true_if_proper_and_download_propers_is_do_not_download .Should().Be(UpgradeableRejectReason.None); } + [Test] + public void should_return_false_if_proper_and_autoDownloadPropers_is_do_not_prefer() + { + GivenAutoDownloadPropers(ProperDownloadTypes.DoNotPrefer); + + var profile = new QualityProfile + { + Items = Qualities.QualityFixture.GetDefaultQualities(), + }; + + Subject.IsUpgradable( + profile, + new QualityModel(Quality.DVD, new Revision(version: 1)), + new List(), + new QualityModel(Quality.DVD, new Revision(version: 2)), + new List()) + .Should().Be(UpgradeableRejectReason.UpgradesNotAllowed); + } + [Test] public void should_return_false_if_release_and_existing_file_are_the_same() {