mirror of
https://github.com/actix/actix-web.git
synced 2025-01-02 13:28:44 +00:00
use different directory for tests
This commit is contained in:
parent
827ca5eada
commit
333b4f57d3
1 changed files with 4 additions and 4 deletions
|
@ -668,7 +668,7 @@ mod tests {
|
||||||
fn test_redirect_to_index() {
|
fn test_redirect_to_index() {
|
||||||
let mut st = StaticFiles::new(".").index_file("index.html");
|
let mut st = StaticFiles::new(".").index_file("index.html");
|
||||||
let mut req = HttpRequest::default();
|
let mut req = HttpRequest::default();
|
||||||
req.match_info_mut().add("tail", "guide");
|
req.match_info_mut().add("tail", "tests");
|
||||||
|
|
||||||
let resp = st.handle(req)
|
let resp = st.handle(req)
|
||||||
.respond_to(HttpRequest::default())
|
.respond_to(HttpRequest::default())
|
||||||
|
@ -677,11 +677,11 @@ mod tests {
|
||||||
assert_eq!(resp.status(), StatusCode::FOUND);
|
assert_eq!(resp.status(), StatusCode::FOUND);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
resp.headers().get(header::LOCATION).unwrap(),
|
resp.headers().get(header::LOCATION).unwrap(),
|
||||||
"/guide/index.html"
|
"/tests/index.html"
|
||||||
);
|
);
|
||||||
|
|
||||||
let mut req = HttpRequest::default();
|
let mut req = HttpRequest::default();
|
||||||
req.match_info_mut().add("tail", "guide/");
|
req.match_info_mut().add("tail", "tests/");
|
||||||
|
|
||||||
let resp = st.handle(req)
|
let resp = st.handle(req)
|
||||||
.respond_to(HttpRequest::default())
|
.respond_to(HttpRequest::default())
|
||||||
|
@ -690,7 +690,7 @@ mod tests {
|
||||||
assert_eq!(resp.status(), StatusCode::FOUND);
|
assert_eq!(resp.status(), StatusCode::FOUND);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
resp.headers().get(header::LOCATION).unwrap(),
|
resp.headers().get(header::LOCATION).unwrap(),
|
||||||
"/guide/index.html"
|
"/tests/index.html"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue