mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 12:02:35 +02:00
Fixed broken tests.
Added new Episode status test for AirsToday.
This commit is contained in:
parent
1c22ec91d6
commit
249bbd63f8
@ -14,7 +14,9 @@ public class EpisodeStatusTest : CoreTest
|
||||
{
|
||||
[TestCase(1, false, false, EpisodeStatusType.NotAired)]
|
||||
[TestCase(-2, false, false, EpisodeStatusType.Missing)]
|
||||
[TestCase(0, false, false, EpisodeStatusType.AirsToday)]
|
||||
[TestCase(1, true, false, EpisodeStatusType.Ready)]
|
||||
[TestCase(0, true, false, EpisodeStatusType.Ready)]
|
||||
public void no_grab_date(int offsetDays, bool hasEpisodes, bool ignored, EpisodeStatusType status)
|
||||
{
|
||||
Episode episode = Builder<Episode>.CreateNew()
|
||||
@ -41,7 +43,8 @@ public void old_grab_date(int offsetDays, bool hasEpisodes, bool ignored,
|
||||
Episode episode = Builder<Episode>.CreateNew()
|
||||
.With(e => e.Ignored = ignored)
|
||||
.With(e => e.EpisodeFileId = 0)
|
||||
.With(e => e.GrabDate = DateTime.Now.AddDays(-1).AddHours(-1))
|
||||
.With(e => e.GrabDate = DateTime.Now.AddDays(-2).AddHours(-1))
|
||||
.With(e => e.AirDate = DateTime.Today.AddDays(-2))
|
||||
.Build();
|
||||
|
||||
if (hasEpisodes)
|
||||
@ -49,7 +52,7 @@ public void old_grab_date(int offsetDays, bool hasEpisodes, bool ignored,
|
||||
episode.EpisodeFileId = 12;
|
||||
}
|
||||
|
||||
Assert.AreEqual(status, episode.Status);
|
||||
episode.Status.Should().Be(status);
|
||||
}
|
||||
|
||||
[TestCase(1, false, false, EpisodeStatusType.Downloading)]
|
||||
|
Loading…
Reference in New Issue
Block a user