From 1c86911e6618f0c7106b9a46e61898115e824c4e Mon Sep 17 00:00:00 2001 From: Ronald Chan Date: Mon, 9 Sep 2019 16:39:33 +0800 Subject: [PATCH] fix h2 service error tests --- actix-http/tests/test_rustls_server.rs | 4 ++-- actix-http/tests/test_ssl_server.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/actix-http/tests/test_rustls_server.rs b/actix-http/tests/test_rustls_server.rs index 32b33fce8..b74fd07bf 100644 --- a/actix-http/tests/test_rustls_server.rs +++ b/actix-http/tests/test_rustls_server.rs @@ -454,9 +454,9 @@ fn test_h2_service_error() { }); let response = srv.block_on(srv.sget("/").send()).unwrap(); - assert_eq!(response.status(), http::StatusCode::INTERNAL_SERVER_ERROR); + assert_eq!(response.status(), http::StatusCode::BAD_REQUEST); // read response let bytes = srv.load_body(response).unwrap(); - assert!(bytes.is_empty()); + assert_eq!(bytes, Bytes::from_static(b"error")); } diff --git a/actix-http/tests/test_ssl_server.rs b/actix-http/tests/test_ssl_server.rs index f0c82870d..897d92b37 100644 --- a/actix-http/tests/test_ssl_server.rs +++ b/actix-http/tests/test_ssl_server.rs @@ -449,11 +449,11 @@ fn test_h2_service_error() { }); let response = srv.block_on(srv.sget("/").send()).unwrap(); - assert_eq!(response.status(), StatusCode::INTERNAL_SERVER_ERROR); + assert_eq!(response.status(), StatusCode::BAD_REQUEST); // read response let bytes = srv.load_body(response).unwrap(); - assert!(bytes.is_empty()); + assert_eq!(bytes, Bytes::from_static(b"error")); } #[test]