From f30aef404d3a015dab4696e07a6fdb3425709ea5 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Sat, 14 Oct 2017 11:13:02 -0700 Subject: [PATCH] fix tests --- tests/test_httpmessage.rs | 14 ++++++++------ tests/test_tmp.rs | 5 ----- 2 files changed, 8 insertions(+), 11 deletions(-) delete mode 100644 tests/test_tmp.rs diff --git a/tests/test_httpmessage.rs b/tests/test_httpmessage.rs index 47eaf7fc1..5f5b923f2 100644 --- a/tests/test_httpmessage.rs +++ b/tests/test_httpmessage.rs @@ -25,12 +25,14 @@ fn test_request_cookies() { let mut req = HttpRequest::new( Method::GET, Uri::try_from("/").unwrap(), Version::HTTP_11, headers); assert!(req.cookies().is_empty()); - let cookies = req.load_cookies().unwrap(); - assert_eq!(cookies.len(), 2); - assert_eq!(cookies[0].name(), "cookie1"); - assert_eq!(cookies[0].value(), "value1"); - assert_eq!(cookies[1].name(), "cookie2"); - assert_eq!(cookies[1].value(), "value2"); + { + let cookies = req.load_cookies().unwrap(); + assert_eq!(cookies.len(), 2); + assert_eq!(cookies[0].name(), "cookie1"); + assert_eq!(cookies[0].value(), "value1"); + assert_eq!(cookies[1].name(), "cookie2"); + assert_eq!(cookies[1].value(), "value2"); + } let cookie = req.cookie("cookie1"); assert!(cookie.is_some()); diff --git a/tests/test_tmp.rs b/tests/test_tmp.rs deleted file mode 100644 index 1c2f50182..000000000 --- a/tests/test_tmp.rs +++ /dev/null @@ -1,5 +0,0 @@ - - -#[test] -fn test_placeholder() { -}