mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-30 11:48:26 -07: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:
parent
c534d47b0a
commit
5098ea3249
15 changed files with 234 additions and 10 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue