1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

Don't fail test if there are no builds with changes shown

This commit is contained in:
Qstick 2020-07-16 21:48:55 -04:00
parent bd5bb2a63c
commit 5eb7a83996

View File

@ -46,13 +46,19 @@ public void should_get_recent_updates()
const string branch = "develop";
UseRealHttp();
var recent = Subject.GetRecentUpdates(branch, new Version(2, 0));
var recentWithChanges = recent.Where(c => c.Changes != null);
recent.Should().NotBeEmpty();
recent.Should().OnlyContain(c => c.Hash.IsNotNullOrWhiteSpace());
recent.Should().OnlyContain(c => c.FileName.Contains("Radarr"));
recent.Should().OnlyContain(c => c.ReleaseDate.Year >= 2014);
recent.Where(c => c.Changes != null).Should().OnlyContain(c => c.Changes.New != null);
recent.Where(c => c.Changes != null).Should().OnlyContain(c => c.Changes.Fixed != null);
if (recentWithChanges.Any())
{
recentWithChanges.Should().OnlyContain(c => c.Changes.New != null);
recentWithChanges.Should().OnlyContain(c => c.Changes.Fixed != null);
}
recent.Should().OnlyContain(c => c.Branch == branch);
}
}