1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-23 23:51:06 +01:00

fix cors tests

This commit is contained in:
Rob Ede 2022-01-01 23:07:27 +00:00
parent 6d6b045b3a
commit 1fec026dc7
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933

View File

@ -267,8 +267,8 @@ async fn test_response() {
.map(HeaderValue::as_bytes)
);
assert_eq!(
Some(&b"Origin"[..]),
resp.headers().get(header::VARY).map(HeaderValue::as_bytes)
resp.headers().get(header::VARY).map(HeaderValue::as_bytes),
Some(&b"Origin, Access-Control-Request-Method, Access-Control-Request-Headers"[..]),
);
#[allow(clippy::needless_collect)]
@ -314,7 +314,7 @@ async fn test_response() {
.to_srv_request();
let resp = test::call_service(&cors, req).await;
assert_eq!(
Some(&b"Accept, Origin"[..]),
Some(&b"Accept, Origin, Access-Control-Request-Method, Access-Control-Request-Headers"[..]),
resp.headers().get(header::VARY).map(HeaderValue::as_bytes)
);