v0.31.8
This commit is contained in:
1 parent
68ada6680d
commit
180a0e4877
56 files changed
+9866
-205
No files matched your search
+15
-1
@@ -77,7 +77,21 @@ mod tests {
|
||||
assert!(builtin_gateway_error(StatusCode::GATEWAY_TIMEOUT)
|
||||
.unwrap()
|
||||
.contains("504 - Gateway timeout"));
|
||||
assert!(builtin_gateway_error(StatusCode::BAD_GATEWAY).is_none());
|
||||
for (code, label) in [
|
||||
(StatusCode::BAD_REQUEST, "400 - Bad request"),
|
||||
(StatusCode::REQUEST_TIMEOUT, "408 - Request timeout"),
|
||||
(StatusCode::GONE, "410 - Gone"),
|
||||
(StatusCode::PAYLOAD_TOO_LARGE, "413 - Payload too large"),
|
||||
(StatusCode::INTERNAL_SERVER_ERROR, "500 - Internal server error"),
|
||||
(StatusCode::BAD_GATEWAY, "502 - Bad gateway"),
|
||||
] {
|
||||
let page = builtin_gateway_error(code).unwrap();
|
||||
assert!(page.contains(label));
|
||||
assert!(page.contains("background: #131615"));
|
||||
}
|
||||
assert!(builtin_gateway_error(StatusCode::OK).is_none());
|
||||
assert!(builtin_application_page(StatusCode::OK).contains("200 - OK"));
|
||||
assert!(builtin_application_page(StatusCode::CREATED).contains("background: #131615"));
|
||||
}
|
||||
#[test]
|
||||
fn validated_bounded_pages_and_ip_detection() {
|
||||
|
||||
Reference in new issue
Block a user