mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-10-03 09:09:42 +02:00
Updated JobProvider to allow jobs with two targets.
JobQueueItem class created instead of using Tuples. Added Search for Season and Rename Season jobs , plus links for them on Series/Details. Add GetSeasonFiles added to MediaFileProvider.
This commit is contained in:
@@ -50,6 +50,35 @@ namespace NzbDrone.Core.Test
|
||||
result.Should().HaveSameCount(firstSeriesFiles);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void get_season_files()
|
||||
{
|
||||
var firstSeriesFiles = Builder<EpisodeFile>.CreateListOfSize(10)
|
||||
.WhereAll()
|
||||
.Have(s => s.SeriesId = 12)
|
||||
.Have(s => s.SeasonNumber = 1)
|
||||
.Build();
|
||||
|
||||
var secondSeriesFiles = Builder<EpisodeFile>.CreateListOfSize(10)
|
||||
.WhereAll()
|
||||
.Have(s => s.SeriesId = 12)
|
||||
.Have(s => s.SeasonNumber = 2)
|
||||
.Build();
|
||||
|
||||
var mocker = new AutoMoqer();
|
||||
|
||||
var database = MockLib.GetEmptyDatabase(true);
|
||||
|
||||
database.InsertMany(firstSeriesFiles);
|
||||
database.InsertMany(secondSeriesFiles);
|
||||
|
||||
mocker.SetConstant(database);
|
||||
|
||||
var result = mocker.Resolve<MediaFileProvider>().GetSeasonFiles(12, 1);
|
||||
|
||||
result.Should().HaveSameCount(firstSeriesFiles);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Scan_series_should_skip_series_with_no_episodes()
|
||||
{
|
||||
|
Reference in New Issue
Block a user