mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-09 04:22:30 +01:00
Don't fail test if there are no builds with changes shown
This commit is contained in:
parent
bd5bb2a63c
commit
5eb7a83996
@ -46,13 +46,19 @@ public void should_get_recent_updates()
|
|||||||
const string branch = "develop";
|
const string branch = "develop";
|
||||||
UseRealHttp();
|
UseRealHttp();
|
||||||
var recent = Subject.GetRecentUpdates(branch, new Version(2, 0));
|
var recent = Subject.GetRecentUpdates(branch, new Version(2, 0));
|
||||||
|
var recentWithChanges = recent.Where(c => c.Changes != null);
|
||||||
|
|
||||||
recent.Should().NotBeEmpty();
|
recent.Should().NotBeEmpty();
|
||||||
recent.Should().OnlyContain(c => c.Hash.IsNotNullOrWhiteSpace());
|
recent.Should().OnlyContain(c => c.Hash.IsNotNullOrWhiteSpace());
|
||||||
recent.Should().OnlyContain(c => c.FileName.Contains("Radarr"));
|
recent.Should().OnlyContain(c => c.FileName.Contains("Radarr"));
|
||||||
recent.Should().OnlyContain(c => c.ReleaseDate.Year >= 2014);
|
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);
|
recent.Should().OnlyContain(c => c.Branch == branch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user