1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-22 22:16:13 -04:00

Search all missing fixes

Fixed: Searching for missing episodes excludes unmonitored episodes
Fixed: Searching for missing episodes episodes with files
This commit is contained in:
Mark McDowall
2015-04-06 17:05:12 -07:00
parent ccfd66260d
commit 0adea0ded6
6 changed files with 40 additions and 19 deletions
@@ -32,7 +32,7 @@ namespace NzbDrone.Core.Test.IndexerSearchTests
.Returns(_series);
Mocker.GetMock<ISearchForNzb>()
.Setup(s => s.SeasonSearch(_series.Id, It.IsAny<Int32>()))
.Setup(s => s.SeasonSearch(_series.Id, It.IsAny<Int32>(), false))
.Returns(new List<DownloadDecision>());
Mocker.GetMock<IProcessDownloadDecisions>()
@@ -52,7 +52,7 @@ namespace NzbDrone.Core.Test.IndexerSearchTests
Subject.Execute(new SeriesSearchCommand{ SeriesId = _series.Id });
Mocker.GetMock<ISearchForNzb>()
.Verify(v => v.SeasonSearch(_series.Id, It.IsAny<Int32>()), Times.Exactly(_series.Seasons.Count(s => s.Monitored)));
.Verify(v => v.SeasonSearch(_series.Id, It.IsAny<Int32>(), false), Times.Exactly(_series.Seasons.Count(s => s.Monitored)));
}
[Test]
@@ -68,9 +68,9 @@ namespace NzbDrone.Core.Test.IndexerSearchTests
};
Mocker.GetMock<ISearchForNzb>()
.Setup(s => s.SeasonSearch(_series.Id, It.IsAny<Int32>()))
.Setup(s => s.SeasonSearch(_series.Id, It.IsAny<Int32>(), false))
.Returns(new List<DownloadDecision>())
.Callback<Int32, Int32>((seriesId, seasonNumber) => seasonOrder.Add(seasonNumber));
.Callback<int, int, bool>((seriesId, seasonNumber, missingOnly) => seasonOrder.Add(seasonNumber));
Subject.Execute(new SeriesSearchCommand { SeriesId = _series.Id });