Skip to content

Commit 80ecc77

Browse files
veloman-yunkanmgautierfr
authored andcommitted
Two more 404 error tests for the /raw endpoint
1 parent b190d96 commit 80ecc77

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

test/server.cpp

+28-1
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,34 @@ TEST_F(ServerTest, 404WithBodyTesting)
532532
<p>
533533
XYZ is not a valid request for raw content.
534534
</p>
535-
)" }
535+
)" },
536+
537+
{ /* url */ "/ROOT/raw/zimfile/meta/invalid-metadata",
538+
/* book name */ "zimfile",
539+
/* book title */ "Ray Charles",
540+
/* expected body */ R"(
541+
<h1>Not Found</h1>
542+
<p>
543+
The requested URL "/ROOT/raw/zimfile/meta/invalid-metadata" was not found on this server.
544+
</p>
545+
<p>
546+
Cannot find meta entry invalid-metadata
547+
</p>
548+
)" },
549+
550+
{ /* url */ "/ROOT/raw/zimfile/content/invalid-article",
551+
/* book name */ "zimfile",
552+
/* book title */ "Ray Charles",
553+
/* expected body */ R"(
554+
<h1>Not Found</h1>
555+
<p>
556+
The requested URL "/ROOT/raw/zimfile/content/invalid-article" was not found on this server.
557+
</p>
558+
<p>
559+
Cannot find content entry invalid-article
560+
</p>
561+
)" },
562+
536563
};
537564

538565
for ( const auto& t : testData ) {

0 commit comments

Comments
 (0)