mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-23 00:07:07 +00:00
Fixed broken tests.
Added new Episode status test for AirsToday.
This commit is contained in:
parent
1c22ec91d6
commit
249bbd63f8
1 changed files with 5 additions and 2 deletions
|
@ -14,7 +14,9 @@ namespace NzbDrone.Core.Test
|
|||
{
|
||||
[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 @@ namespace NzbDrone.Core.Test
|
|||
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 @@ namespace NzbDrone.Core.Test
|
|||
episode.EpisodeFileId = 12;
|
||||
}
|
||||
|
||||
Assert.AreEqual(status, episode.Status);
|
||||
episode.Status.Should().Be(status);
|
||||
}
|
||||
|
||||
[TestCase(1, false, false, EpisodeStatusType.Downloading)]
|
||||
|
|
Loading…
Reference in a new issue