test(http): test Uri parse errors propagate

This commit is contained in:
Sean McArthur
2017-02-06 13:37:02 -08:00
parent fc808ef9f8
commit 23ac1bfe82

View File

@@ -282,6 +282,11 @@ mod tests {
parse::<http::ServerTransaction, _>(&raw).unwrap();
}
#[test]
fn test_parse_request_errors() {
let raw = MemBuf::from(b"GET htt:p// HTTP/1.1\r\nHost: hyper.rs\r\n\r\n".to_vec());
parse::<http::ServerTransaction, _>(&raw).unwrap_err();
}
#[test]
fn test_parse_raw_status() {
let raw = MemBuf::from(b"HTTP/1.1 200 OK\r\n\r\n".to_vec());