More test points in ServerTest.404WithBodyTesting

This commit is contained in:
Veloman Yunkan 2022-01-21 23:08:32 +04:00 committed by Matthieu Gautier
parent 0ba452aece
commit ae2d9b234f
1 changed files with 33 additions and 0 deletions

View File

@ -386,6 +386,39 @@ TEST_F(ServerTest, 404WithBodyTesting)
</p> </p>
)" }, )" },
{ /* url */ "/ROOT/catalog/",
/* expected body */ R"(
<h1>Not Found</h1>
<p>
The requested URL "/ROOT/catalog/" was not found on this server.
</p>
<p>
//EOLWHITESPACEMARKER
</p>
)" },
{ /* url */ "/ROOT/catalog/invalid_endpoint",
/* expected body */ R"(
<h1>Not Found</h1>
<p>
The requested URL "/ROOT/catalog/invalid_endpoint" was not found on this server.
</p>
<p>
//EOLWHITESPACEMARKER
</p>
)" },
{ /* url */ "/ROOT/invalid-book/whatever",
/* expected body */ R"(
<h1>Not Found</h1>
<p>
The requested URL "/ROOT/invalid-book/whatever" was not found on this server.
</p>
<p>
Make a full text search for <a href="/ROOT/search?pattern=whatever">whatever</a>
</p>
)" },
{ /* url */ "/ROOT/raw/no-such-book/meta/Title", { /* url */ "/ROOT/raw/no-such-book/meta/Title",
/* expected body */ R"( /* expected body */ R"(
<h1>Not Found</h1> <h1>Not Found</h1>