We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bdbf55f commit f27f37eCopy full SHA for f27f37e
src/lib.rs
@@ -100,9 +100,9 @@ mod tests {
100
.write_all(b"[package]").unwrap();
101
let mut req = test::MockRequest::new(Method::Get, "/Cargo.toml");
102
let mut res = handler.call(&mut req).ok().expect("No response");
103
- let mut body = String::new();
104
- res.body.read_to_string(&mut body).unwrap();
105
- assert_eq!(body, "[package]");
+ let mut body = Vec::new();
+ res.body.write_body(&mut body).unwrap();
+ assert_eq!(body, b"[package]");
106
assert_eq!(res.headers.get("Content-Type"),
107
Some(&vec!("text/plain".to_string())));
108
assert_eq!(res.headers.get("Content-Length"),
0 commit comments