Testing of "Fulltext search unavailable" page

This commit is contained in:
Veloman Yunkan
2022-01-30 15:59:17 +04:00
parent aaf232bee4
commit 511261cc81
3 changed files with 27 additions and 2 deletions

View File

@ -662,6 +662,30 @@ TEST_F(ServerTest, 404WithBodyTesting)
Cannot find content entry invalid-article
</p>
)" },
{ /* url */ "/ROOT/search?content=zimfile",
expected_page_title=="Fulltext search unavailable" &&
expected_css_url=="/ROOT/skin/search_results.css" &&
book_name=="zimfile" &&
book_title=="Ray Charles" &&
expected_body==R"(
<div class="header">Not found</div>
<p>
There is no article with the title <b> ""</b>
and the fulltext search engine is not available for this content.
</p>
)" },
{ /* url */ "/ROOT/search?content=non-existent-book&pattern=asdfqwerty",
expected_page_title=="Fulltext search unavailable" &&
expected_css_url=="/ROOT/skin/search_results.css" &&
expected_body==R"(
<div class="header">Not found</div>
<p>
There is no article with the title <b> "asdfqwerty"</b>
and the fulltext search engine is not available for this content.
</p>
)" },
};
for ( const auto& t : testData ) {