From 333b4f57d3f9a6e32b3042ad03300098c538ad17 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Fri, 13 Apr 2018 17:00:18 -0700 Subject: [PATCH] use different directory for tests --- src/fs.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/fs.rs b/src/fs.rs index 4e7305b0e..5f734d008 100644 --- a/src/fs.rs +++ b/src/fs.rs @@ -668,7 +668,7 @@ mod tests { fn test_redirect_to_index() { let mut st = StaticFiles::new(".").index_file("index.html"); let mut req = HttpRequest::default(); - req.match_info_mut().add("tail", "guide"); + req.match_info_mut().add("tail", "tests"); let resp = st.handle(req) .respond_to(HttpRequest::default()) @@ -677,11 +677,11 @@ mod tests { assert_eq!(resp.status(), StatusCode::FOUND); assert_eq!( resp.headers().get(header::LOCATION).unwrap(), - "/guide/index.html" + "/tests/index.html" ); let mut req = HttpRequest::default(); - req.match_info_mut().add("tail", "guide/"); + req.match_info_mut().add("tail", "tests/"); let resp = st.handle(req) .respond_to(HttpRequest::default()) @@ -690,7 +690,7 @@ mod tests { assert_eq!(resp.status(), StatusCode::FOUND); assert_eq!( resp.headers().get(header::LOCATION).unwrap(), - "/guide/index.html" + "/tests/index.html" ); }