Serve FAQs from PocketBase on a grouped /faqs page

This commit is contained in:
tleininger committed 2026-09-23 14:15:16 +02:00
1 parent 4136af6417
commit 6b5d9dda55
7 files changed
+127 -7

No files matched your search

+16 -1
View File
@@ -48,7 +48,7 @@ public sealed class RouteSmokeTests : IDisposable
"/",
"/board",
"/patrons",
"/faq",
"/faqs",
"/faq-mensa",
"/downloads",
"/contact",
@@ -83,4 +83,19 @@ public sealed class RouteSmokeTests : IDisposable
response.StatusCode.ShouldBe(HttpStatusCode.NotFound);
}
[Fact]
public async Task Faqs_route_renders_the_grouped_list()
{
// /faqs is a literal route (FaqList) that must win over the /{Slug}
// catch-all content page. Assert it shows the FAQ list, grouped by topic
// from the seeded questions, not a content page body.
var client = _factory.CreateClient();
var html = await client.GetStringAsync(new Uri("/faqs", UriKind.Relative));
html.ShouldContain("Häufige Fragen");
html.ShouldContain("Wann gibt es Mittagessen?");
html.ShouldContain("Mensa und Mittagessen"); // German topic heading
}
}