mirror of
https://github.com/fafhrd91/actix-web
synced 2025-01-18 13:51:50 +01:00
expect error tests
This commit is contained in:
parent
1a0e87ac3c
commit
c44e4ad100
@ -393,6 +393,14 @@ mod tests {
|
|||||||
assert_eq!(e, HttpRangeError::NoOverlap);
|
assert_eq!(e, HttpRangeError::NoOverlap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_expect_error() {
|
||||||
|
let resp: HttpResponse = ExpectError::Encoding.error_response();
|
||||||
|
assert_eq!(resp.status(), StatusCode::EXPECTATION_FAILED);
|
||||||
|
let resp: HttpResponse = ExpectError::UnknownExpect.error_response();
|
||||||
|
assert_eq!(resp.status(), StatusCode::EXPECTATION_FAILED);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_wserror_http_response() {
|
fn test_wserror_http_response() {
|
||||||
let resp: HttpResponse = WsHandshakeError::GetMethodRequired.error_response();
|
let resp: HttpResponse = WsHandshakeError::GetMethodRequired.error_response();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user