1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-26 10:27:42 +02:00

bump actix-web to 4.0.0-rc.1

This commit is contained in:
Rob Ede
2022-02-03 22:33:47 +00:00
parent 6abec48e29
commit 323d01fcca
27 changed files with 84 additions and 79 deletions

View File

@ -17,7 +17,7 @@ fn val_as_str(val: &HeaderValue) -> &str {
val.to_str().unwrap()
}
#[actix_rt::test]
#[actix_web::test]
#[should_panic]
async fn test_wildcard_origin() {
Cors::default()
@ -27,7 +27,7 @@ async fn test_wildcard_origin() {
.unwrap();
}
#[actix_rt::test]
#[actix_web::test]
async fn test_not_allowed_origin_fn() {
let cors = Cors::default()
.allowed_origin("https://www.example.com")
@ -73,7 +73,7 @@ async fn test_not_allowed_origin_fn() {
}
}
#[actix_rt::test]
#[actix_web::test]
async fn test_allowed_origin_fn() {
let cors = Cors::default()
.allowed_origin("https://www.example.com")
@ -118,7 +118,7 @@ async fn test_allowed_origin_fn() {
);
}
#[actix_rt::test]
#[actix_web::test]
async fn test_allowed_origin_fn_with_environment() {
let regex = Regex::new("https:.+\\.unknown\\.com").unwrap();
@ -165,7 +165,7 @@ async fn test_allowed_origin_fn_with_environment() {
);
}
#[actix_rt::test]
#[actix_web::test]
async fn test_multiple_origins_preflight() {
let cors = Cors::default()
.allowed_origin("https://example.com")
@ -204,7 +204,7 @@ async fn test_multiple_origins_preflight() {
);
}
#[actix_rt::test]
#[actix_web::test]
async fn test_multiple_origins() {
let cors = Cors::default()
.allowed_origin("https://example.com")
@ -239,7 +239,7 @@ async fn test_multiple_origins() {
);
}
#[actix_rt::test]
#[actix_web::test]
async fn test_response() {
let exposed_headers = vec![header::AUTHORIZATION, header::ACCEPT];
let cors = Cors::default()
@ -340,7 +340,7 @@ async fn test_response() {
assert_eq!(Some("https://www.example.com"), origins_str);
}
#[actix_rt::test]
#[actix_web::test]
async fn test_validate_origin() {
let cors = Cors::default()
.allowed_origin("https://www.example.com")
@ -356,7 +356,7 @@ async fn test_validate_origin() {
assert_eq!(resp.status(), StatusCode::OK);
}
#[actix_rt::test]
#[actix_web::test]
async fn test_no_origin_response() {
let cors = Cors::permissive()
.disable_preflight()
@ -384,7 +384,7 @@ async fn test_no_origin_response() {
);
}
#[actix_rt::test]
#[actix_web::test]
async fn validate_origin_allows_all_origins() {
let cors = Cors::permissive()
.new_transform(test::ok_service())
@ -399,7 +399,7 @@ async fn validate_origin_allows_all_origins() {
assert_eq!(resp.status(), StatusCode::OK);
}
#[actix_rt::test]
#[actix_web::test]
async fn test_allow_any_origin_any_method_any_header() {
let cors = Cors::default()
.allow_any_origin()