diff --git a/test/response.cpp b/test/response.cpp index c65691b8..cbfbfd3d 100644 --- a/test/response.cpp +++ b/test/response.cpp @@ -46,3 +46,30 @@ R"( )"); } + +TEST(HTTPErrorResponse, shouldBeTranslatable) { + const RequestContext req = makeHttpGetRequest("/asdf", + /* headers */ {}, + /* query args */ {{"userlang", "test"}} + ); + + HTTPErrorResponse errResp(req, MHD_HTTP_NOT_FOUND, + "404-page-title", + "404-page-heading", + "/css/error.css"); + + EXPECT_EQ(getResponseContent(errResp), +R"( + + + + [I18N TESTING] Not Found - Try Again + + + +

[I18N TESTING] Content not found, but at least the server is alive

+ + + +)"); +}