mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-27 17:52:56 +01:00
fix test
This commit is contained in:
parent
5e9ec4299c
commit
c0976bfa17
@ -625,12 +625,12 @@ mod tests {
|
|||||||
fn test_redirect_to_index_nested() {
|
fn test_redirect_to_index_nested() {
|
||||||
let mut st = StaticFiles::new(".").index_file("Cargo.toml");
|
let mut st = StaticFiles::new(".").index_file("Cargo.toml");
|
||||||
let mut req = HttpRequest::default();
|
let mut req = HttpRequest::default();
|
||||||
req.match_info_mut().add("tail", "examples/basics");
|
req.match_info_mut().add("tail", "tools/wsload");
|
||||||
|
|
||||||
let resp = st.handle(req).respond_to(HttpRequest::default()).unwrap();
|
let resp = st.handle(req).respond_to(HttpRequest::default()).unwrap();
|
||||||
let resp = resp.as_response().expect("HTTP Response");
|
let resp = resp.as_response().expect("HTTP Response");
|
||||||
assert_eq!(resp.status(), StatusCode::FOUND);
|
assert_eq!(resp.status(), StatusCode::FOUND);
|
||||||
assert_eq!(resp.headers().get(header::LOCATION).unwrap(), "/examples/basics/Cargo.toml");
|
assert_eq!(resp.headers().get(header::LOCATION).unwrap(), "/tools/wsload/Cargo.toml");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
Loading…
Reference in New Issue
Block a user