1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-30 10:32:55 +01:00

fix tests

This commit is contained in:
Nikolay Kim 2017-10-14 11:13:02 -07:00
parent edac148f7c
commit f30aef404d
2 changed files with 8 additions and 11 deletions

View File

@ -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 cookie = req.cookie("cookie1");
assert!(cookie.is_some());

View File

@ -1,5 +0,0 @@
#[test]
fn test_placeholder() {
}