mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-28 01:32:57 +01:00
add error response test for cors
This commit is contained in:
parent
548f6f89bf
commit
bc01d39d4d
@ -871,6 +871,8 @@ mod tests {
|
||||
|
||||
assert!(cors.inner.validate_allowed_method(&req).is_err());
|
||||
assert!(cors.inner.validate_allowed_headers(&req).is_err());
|
||||
let resp = test::call_success(&mut cors, req);
|
||||
assert_eq!(resp.status(), StatusCode::BAD_REQUEST);
|
||||
|
||||
let req = TestRequest::with_header("Origin", "https://www.example.com")
|
||||
.header(header::ACCESS_CONTROL_REQUEST_METHOD, "put")
|
||||
|
Loading…
Reference in New Issue
Block a user