mirror of
https://github.com/actix/actix-web.git
synced 2024-11-20 08:31:09 +00:00
expect error tests
This commit is contained in:
parent
1a0e87ac3c
commit
c44e4ad100
1 changed files with 8 additions and 0 deletions
|
@ -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…
Reference in a new issue