1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-24 22:37:35 +02:00

port multipart support

This commit is contained in:
Nikolay Kim
2019-03-28 05:04:39 -07:00
parent c59937784e
commit 4309d9b88c
6 changed files with 1194 additions and 3 deletions

View File

@ -905,6 +905,20 @@ mod tests {
assert_eq!(resp.status(), StatusCode::INTERNAL_SERVER_ERROR);
}
#[test]
fn test_payload_error() {
let err: PayloadError =
io::Error::new(io::ErrorKind::Other, "ParseError").into();
assert_eq!(format!("{}", err), "ParseError");
assert_eq!(format!("{}", err.cause().unwrap()), "ParseError");
let err = PayloadError::Incomplete;
assert_eq!(
format!("{}", err),
"A payload reached EOF, but is not complete."
);
}
macro_rules! from {
($from:expr => $error:pat) => {
match ParseError::from($from) {