Skip to content

Commit

Permalink
Two more 404 error tests for the /raw endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
veloman-yunkan committed Feb 11, 2022
1 parent 2add0de commit b4cb047
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion test/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,34 @@ TEST_F(ServerTest, 404WithBodyTesting)
<p>
XYZ is not a valid request for raw content.
</p>
)" }
)" },

{ /* url */ "/ROOT/raw/zimfile/meta/invalid-metadata",
/* book name */ "zimfile",
/* book title */ "Ray Charles",
/* expected body */ R"(
<h1>Not Found</h1>
<p>
The requested URL "/ROOT/raw/zimfile/meta/invalid-metadata" was not found on this server.
</p>
<p>
Cannot find meta entry invalid-metadata
</p>
)" },

{ /* url */ "/ROOT/raw/zimfile/content/invalid-article",
/* book name */ "zimfile",
/* book title */ "Ray Charles",
/* expected body */ R"(
<h1>Not Found</h1>
<p>
The requested URL "/ROOT/raw/zimfile/content/invalid-article" was not found on this server.
</p>
<p>
Cannot find content entry invalid-article
</p>
)" },

};

for ( const auto& t : testData ) {
Expand Down

0 comments on commit b4cb047

Please sign in to comment.