diff --git a/GamesDoneQuickCalendarFactory/Program.cs b/GamesDoneQuickCalendarFactory/Program.cs index 89c271e..8bf1d16 100644 --- a/GamesDoneQuickCalendarFactory/Program.cs +++ b/GamesDoneQuickCalendarFactory/Program.cs @@ -51,10 +51,10 @@ async Task (ICalendarGenerator calendarGenerator, HttpResponse response, [FromQu webApp.MapGet("/badge.json", [OutputCache(Duration = CACHE_DURATION_MINUTES * 60)] async (IEventDownloader eventDownloader) => await eventDownloader.downloadSchedule() is { } schedule ? new ShieldsBadgeResponse( - label: Regex.Replace(schedule.shortTitle, @"(?<=\D)(?=\d)|(?<=[a-z])(?=[A-Z])", " "), // add spaces to abbreviation + label: Regex.Replace(schedule.shortTitle, @"(?<=\D)(?=\d)|(?<=[a-z])(?=[A-Z])", " ").ToLower(), // add spaces to abbreviation message: $"{schedule.runs.Count} {(schedule.runs.Count == 1 ? "run" : "runs")}", color: "success", logoSvg: Resources.gdqDpadBadgeLogo) - : new ShieldsBadgeResponse("GDQ", "no event now", "important", false, Resources.gdqDpadBadgeLogo)); + : new ShieldsBadgeResponse("gdq", "no event now", "important", false, Resources.gdqDpadBadgeLogo)); webApp.Run(); \ No newline at end of file diff --git a/Tests/ServerTest.cs b/Tests/ServerTest.cs index 2133204..fbd12aa 100644 --- a/Tests/ServerTest.cs +++ b/Tests/ServerTest.cs @@ -102,7 +102,7 @@ public async Task badgeJson() { response.Should().NotBeNull(); response!["schemaVersion"]!.GetValue().Should().Be(1); - response["label"]!.GetValue().Should().Be("AGDQ 2024"); + response["label"]!.GetValue().Should().Be("agdq 2024"); response["message"]!.GetValue().Should().Be("145 runs"); response["color"]!.GetValue().Should().Be("success"); response["isError"]!.GetValue().Should().BeFalse(); @@ -116,7 +116,7 @@ public async Task badgeJsonFrameFatales() { JsonObject? response = await client.GetFromJsonAsync("/badge.json"); - response?["label"]?.GetValue().Should().Be("Frost Fatales 2024"); + response?["label"]?.GetValue().Should().Be("frost fatales 2024"); } [Fact] @@ -127,7 +127,7 @@ public async Task badgeJsonEmpty() { response.Should().NotBeNull(); response!["schemaVersion"]!.GetValue().Should().Be(1); - response["label"]!.GetValue().Should().Be("GDQ"); + response["label"]!.GetValue().Should().Be("gdq"); response["message"]!.GetValue().Should().Be("no event now"); response["color"]!.GetValue().Should().Be("important"); response["isError"]!.GetValue().Should().BeFalse();