TestNew | Tests default error page rendering | Returns 404 status and displays default “Not Found” page with error code |
TestWithOptions_CustomPages | Tests custom error page configuration | Renders custom title “Oops!” and message for 404 errors |
TestWithOptions_CustomTemplate | Tests custom HTML template | Renders error using custom template format “Error 500: …” |
TestWithOptions_NotFoundHandler | Tests custom 404 handler | Returns JSON response {"error":"not found"} instead of HTML |
TestWithOptions_ErrorHandler | Tests custom error handler for all errors | Returns “Custom error handler” text for any error status |
TestWithOptions_SuccessDoesNotShowErrorPage | Verifies successful responses bypass error pages | Returns “success” without error page interference |
TestNotFound | Tests NotFound() middleware function | Returns 404 status with “Not Found” text |
TestCustom | Tests Custom() middleware with specific pages | Renders “Maintenance” page for 503 status |
TestPage404 | Tests Page404 helper function | Creates page with code 404 and custom title/message |
TestPage500 | Tests Page500 helper function | Creates page with code 500 and custom title/message |
TestDefaultPages | Validates all default error pages exist | Confirms default pages for codes 400, 401, 403, 404, 405, 500, 502, 503, 504 |