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

@ -597,7 +597,7 @@ mod test {
.is_err());
}
#[actix_rt::test]
#[actix_web::test]
async fn restrictive_defaults() {
let cors = Cors::default()
.new_transform(test::ok_service())
@ -612,12 +612,12 @@ mod test {
assert_eq!(resp.status(), StatusCode::BAD_REQUEST);
}
#[actix_rt::test]
#[actix_web::test]
async fn allowed_header_try_from() {
let _cors = Cors::default().allowed_header("Content-Type");
}
#[actix_rt::test]
#[actix_web::test]
async fn allowed_header_try_into() {
struct ContentType;
@ -632,7 +632,7 @@ mod test {
let _cors = Cors::default().allowed_header(ContentType);
}
#[actix_rt::test]
#[actix_web::test]
async fn middleware_generic_over_body_type() {
let srv = fn_service(|req: ServiceRequest| async move {
Ok(req.into_response(HttpResponse::with_body(StatusCode::OK, body::None::new())))

View File

@ -218,7 +218,7 @@ mod test {
val.to_str().unwrap()
}
#[actix_rt::test]
#[actix_web::test]
async fn test_validate_not_allowed_origin() {
let cors = Cors::default()
.allowed_origin("https://www.example.com")
@ -236,7 +236,7 @@ mod test {
assert!(cors.inner.validate_allowed_headers(req.head()).is_err());
}
#[actix_rt::test]
#[actix_web::test]
async fn test_preflight() {
let mut cors = Cors::default()
.allow_any_origin()

View File

@ -195,7 +195,7 @@ mod tests {
use super::*;
use crate::Cors;
#[actix_rt::test]
#[actix_web::test]
async fn test_options_no_origin() {
// Tests case where allowed_origins is All but there are validate functions to run incase.
// In this case, origins are only allowed when the DNT header is sent.