Got rid of static/templates/no_search_result.html

The "Fulltext search unavailable" error page is now generated using the
static/templates/error.html template. Also added two test cases checking
that error page.
This commit is contained in:
Veloman Yunkan
2022-01-30 17:00:21 +04:00
committed by Matthieu Gautier
parent dbcbdff275
commit ae1bf39023
5 changed files with 24 additions and 23 deletions

View File

@@ -686,6 +686,18 @@ TEST_F(ServerTest, 404WithBodyTesting)
Cannot find content entry invalid-article
</p>
)" },
{ /* url */ "/ROOT/search?content=poor&pattern=whatever",
expected_page_title=="Fulltext search unavailable" &&
expected_css_url=="/ROOT/skin/search_results.css" &&
book_name=="poor" &&
book_title=="poor" &&
expected_body==R"(
<h1>Not Found</h1>
<p>
The fulltext search engine is not available for this content.
</p>
)" },
};
for ( const auto& t : testData ) {