mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Added two new Episode Statuses - Unpacking and Failed.
Tests added to support new Statuses. PostDownloadScanJob will update PostDownloadStatus for failed or unpacking. ImportFile will set the PostDownloadStatus to Processed when added to the database.
This commit is contained in:
@@ -108,5 +108,27 @@ namespace NzbDrone.Core.Test
|
||||
|
||||
episode.Status.Should().Be(EpisodeStatusType.NotAired);
|
||||
}
|
||||
|
||||
[TestCase(false, false, EpisodeStatusType.Failed, PostDownloadStatusType.Failed)]
|
||||
[TestCase(false, false, EpisodeStatusType.Unpacking, PostDownloadStatusType.Unpacking)]
|
||||
[TestCase(true, false, EpisodeStatusType.Ready, PostDownloadStatusType.Failed)]
|
||||
[TestCase(true, true, EpisodeStatusType.Ready, PostDownloadStatusType.Unpacking)]
|
||||
public void episode_downloaded_post_download_status_is_used(bool hasEpisodes, bool ignored,
|
||||
EpisodeStatusType status, PostDownloadStatusType postDownloadStatus)
|
||||
{
|
||||
Episode episode = Builder<Episode>.CreateNew()
|
||||
.With(e => e.Ignored = ignored)
|
||||
.With(e => e.EpisodeFileId = 0)
|
||||
.With(e => e.GrabDate = DateTime.Now.AddHours(22))
|
||||
.With(e => e.PostDownloadStatus = postDownloadStatus)
|
||||
.Build();
|
||||
|
||||
if (hasEpisodes)
|
||||
{
|
||||
episode.EpisodeFileId = 12;
|
||||
}
|
||||
|
||||
Assert.AreEqual(status, episode.Status);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user