Let editors define FAQ topics freely instead of a hard-coded map

This commit is contained in:
tleininger committed 2026-09-24 14:49:15 +02:00
1 parent 01d25eb04b
commit c7c55c0c6c
8 files changed
+26 -32

No files matched your search

@@ -111,7 +111,7 @@ public sealed class PocketBaseClientTests(PocketBaseFixture pocketBase)
var faqs = await client.GetFaqsAsync();
faqs.Select(f => f.Topic).ShouldBe(["mensa", "schliessfach"], ignoreOrder: true);
faqs.Select(f => f.Topic).ShouldBe(["Mensa und Mittagessen", "Schließfächer"], ignoreOrder: true);
faqs.ShouldAllBe(f => !string.IsNullOrWhiteSpace(f.Question));
}
}
+2 -2
View File
@@ -317,12 +317,12 @@ public sealed class PocketBaseFixture : IAsyncLifetime
await CreateRecordAsync(http, "faqs", new
{
question = "Wann gibt es Mittagessen?", answer = "Um 12 Uhr.",
topic = "mensa", @public = true,
topic = "Mensa und Mittagessen", @public = true,
});
await CreateRecordAsync(http, "faqs", new
{
question = "Wie viel kostet ein Schließfach?", answer = "20 Euro.",
topic = "schliessfach", @public = true,
topic = "Schließfächer", @public = true,
});
}