mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-24 00:21:08 +01:00
Fix failing test on Windows (#3037)
This commit is contained in:
parent
241da6e081
commit
4eeb01415c
@ -422,10 +422,14 @@ mod tests {
|
|||||||
|
|
||||||
assert_eq!(res.status(), StatusCode::OK);
|
assert_eq!(res.status(), StatusCode::OK);
|
||||||
let body = test::read_body(res).await;
|
let body = test::read_body(res).await;
|
||||||
|
let body_str = std::str::from_utf8(&body).unwrap();
|
||||||
|
let actual_path = Path::new(&body_str);
|
||||||
|
let expected_path = Path::new("actix-files/tests");
|
||||||
assert!(
|
assert!(
|
||||||
body.ends_with(b"actix-files/tests/"),
|
actual_path.ends_with(expected_path),
|
||||||
"body {:?} does not end with `actix-files/tests/`",
|
"body {:?} does not end with {:?}",
|
||||||
body
|
actual_path,
|
||||||
|
expected_path
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user