Read heading and intro from the pages record on /posts and /events
This commit is contained in:
1 parent
666614a3b2
commit
4fa17429b5
7 files changed
+87
-7
No files matched your search
@@ -140,6 +140,24 @@ public sealed class RouteSmokeTests : IDisposable
|
||||
html.ShouldContain("Förderverein"); // the page body, rendered from Markdown
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Posts_and_events_render_their_page_heading_and_body()
|
||||
{
|
||||
// /posts and /events are served by PostList and EventList, which -- like
|
||||
// FaqList -- read their own "posts"/"events" page record for heading and
|
||||
// intro instead of hard-coding them. Assert both the title (as the h1) and
|
||||
// the body text from the fixture records reach the markup.
|
||||
var client = _factory.CreateClient();
|
||||
|
||||
var posts = await client.GetStringAsync(new Uri("/posts", UriKind.Relative));
|
||||
posts.ShouldContain("Beiträge"); // heading from the page title
|
||||
posts.ShouldContain("Neuigkeiten aus dem Elternbeirat."); // the page body
|
||||
|
||||
var events = await client.GetStringAsync(new Uri("/events", UriKind.Relative));
|
||||
events.ShouldContain("Termine"); // heading from the page title
|
||||
events.ShouldContain("Sitzungen und Veranstaltungen auf einen Blick."); // the page body
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Health_returns_200_when_PocketBase_is_reachable()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user