|
|
|
@ -5,7 +5,6 @@ using FluentAssertions;
|
|
|
|
|
using Moq;
|
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
using NzbDrone.Core.DecisionEngine.Specifications.RssSync;
|
|
|
|
|
using NzbDrone.Core.Download;
|
|
|
|
|
using NzbDrone.Core.History;
|
|
|
|
|
using NzbDrone.Core.IndexerSearch.Definitions;
|
|
|
|
|
using NzbDrone.Core.Parser.Model;
|
|
|
|
@ -148,7 +147,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
|
|
|
|
[Test]
|
|
|
|
|
public void should_not_be_upgradable_if_episode_is_of_same_quality_as_existing()
|
|
|
|
|
{
|
|
|
|
|
_fakeSeries.Profile = new Profile { Cutoff = Quality.WEBDL1080p, Items = Qualities.QualityFixture.GetDefaultQualities() };
|
|
|
|
|
_fakeSeries.Profile = new Profile { Cutoff = Quality.Bluray1080p, Items = Qualities.QualityFixture.GetDefaultQualities() };
|
|
|
|
|
_parseResultSingle.ParsedEpisodeInfo.Quality = new QualityModel(Quality.WEBDL1080p, new Revision(version: 1));
|
|
|
|
|
_upgradableQuality = new QualityModel(Quality.WEBDL1080p, new Revision(version: 1));
|
|
|
|
|
|
|
|
|
@ -156,5 +155,17 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
|
|
|
|
|
|
|
|
|
_upgradeHistory.IsSatisfiedBy(_parseResultSingle, null).Accepted.Should().BeFalse();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
public void should_not_be_upgradable_if_cutoff_already_met()
|
|
|
|
|
{
|
|
|
|
|
_fakeSeries.Profile = new Profile { Cutoff = Quality.WEBDL1080p, Items = Qualities.QualityFixture.GetDefaultQualities() };
|
|
|
|
|
_parseResultSingle.ParsedEpisodeInfo.Quality = new QualityModel(Quality.WEBDL1080p, new Revision(version: 1));
|
|
|
|
|
_upgradableQuality = new QualityModel(Quality.Bluray1080p, new Revision(version: 1));
|
|
|
|
|
|
|
|
|
|
GivenMostRecentForEpisode(FIRST_EPISODE_ID, string.Empty, _upgradableQuality, DateTime.UtcNow, HistoryEventType.Grabbed);
|
|
|
|
|
|
|
|
|
|
_upgradeHistory.IsSatisfiedBy(_parseResultSingle, null).Accepted.Should().BeFalse();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|