mirror of https://github.com/Radarr/Radarr
Fixed some disk upgrade tests that were testing the wrong thing
This commit is contained in:
parent
3965518023
commit
d7b0183457
|
@ -128,6 +128,8 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
||||||
[Test]
|
[Test]
|
||||||
public void should_return_false_when_episodeFile_was_added_more_than_7_days_ago()
|
public void should_return_false_when_episodeFile_was_added_more_than_7_days_ago()
|
||||||
{
|
{
|
||||||
|
_firstFile.Quality.Quality = Quality.DVD;
|
||||||
|
|
||||||
_firstFile.DateAdded = DateTime.Today.AddDays(-30);
|
_firstFile.DateAdded = DateTime.Today.AddDays(-30);
|
||||||
_upgradeDisk.IsSatisfiedBy(_parseResultSingle, null).Should().BeFalse();
|
_upgradeDisk.IsSatisfiedBy(_parseResultSingle, null).Should().BeFalse();
|
||||||
}
|
}
|
||||||
|
@ -135,6 +137,9 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
||||||
[Test]
|
[Test]
|
||||||
public void should_return_false_when_first_episodeFile_was_added_more_than_7_days_ago()
|
public void should_return_false_when_first_episodeFile_was_added_more_than_7_days_ago()
|
||||||
{
|
{
|
||||||
|
_firstFile.Quality.Quality = Quality.DVD;
|
||||||
|
_secondFile.Quality.Quality = Quality.DVD;
|
||||||
|
|
||||||
_firstFile.DateAdded = DateTime.Today.AddDays(-30);
|
_firstFile.DateAdded = DateTime.Today.AddDays(-30);
|
||||||
_upgradeDisk.IsSatisfiedBy(_parseResultMulti, null).Should().BeFalse();
|
_upgradeDisk.IsSatisfiedBy(_parseResultMulti, null).Should().BeFalse();
|
||||||
}
|
}
|
||||||
|
@ -142,6 +147,9 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
||||||
[Test]
|
[Test]
|
||||||
public void should_return_false_when_second_episodeFile_was_added_more_than_7_days_ago()
|
public void should_return_false_when_second_episodeFile_was_added_more_than_7_days_ago()
|
||||||
{
|
{
|
||||||
|
_firstFile.Quality.Quality = Quality.DVD;
|
||||||
|
_secondFile.Quality.Quality = Quality.DVD;
|
||||||
|
|
||||||
_secondFile.DateAdded = DateTime.Today.AddDays(-30);
|
_secondFile.DateAdded = DateTime.Today.AddDays(-30);
|
||||||
_upgradeDisk.IsSatisfiedBy(_parseResultMulti, null).Should().BeFalse();
|
_upgradeDisk.IsSatisfiedBy(_parseResultMulti, null).Should().BeFalse();
|
||||||
}
|
}
|
||||||
|
@ -149,7 +157,8 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
||||||
[Test]
|
[Test]
|
||||||
public void should_return_true_when_episodeFile_was_added_more_than_7_days_ago_but_proper_is_for_better_quality()
|
public void should_return_true_when_episodeFile_was_added_more_than_7_days_ago_but_proper_is_for_better_quality()
|
||||||
{
|
{
|
||||||
_firstFile.Quality.Quality = Quality.SDTV;
|
WithFirstFileUpgradable();
|
||||||
|
|
||||||
_firstFile.DateAdded = DateTime.Today.AddDays(-30);
|
_firstFile.DateAdded = DateTime.Today.AddDays(-30);
|
||||||
_upgradeDisk.IsSatisfiedBy(_parseResultSingle, null).Should().BeTrue();
|
_upgradeDisk.IsSatisfiedBy(_parseResultSingle, null).Should().BeTrue();
|
||||||
}
|
}
|
||||||
|
@ -157,6 +166,8 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
|
||||||
[Test]
|
[Test]
|
||||||
public void should_return_true_when_episodeFile_was_added_more_than_7_days_ago_but_is_for_search()
|
public void should_return_true_when_episodeFile_was_added_more_than_7_days_ago_but_is_for_search()
|
||||||
{
|
{
|
||||||
|
WithFirstFileUpgradable();
|
||||||
|
|
||||||
_firstFile.DateAdded = DateTime.Today.AddDays(-30);
|
_firstFile.DateAdded = DateTime.Today.AddDays(-30);
|
||||||
_upgradeDisk.IsSatisfiedBy(_parseResultSingle, new SingleEpisodeSearchCriteria()).Should().BeTrue();
|
_upgradeDisk.IsSatisfiedBy(_parseResultSingle, new SingleEpisodeSearchCriteria()).Should().BeTrue();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue