Skip to content

Commit 08bb900

Browse files
committed
Update tests.
1 parent 176deda commit 08bb900

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/mime.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ mod tests {
66

77
#[async_std::test]
88
async fn guess_plain_text_mime() -> io::Result<()> {
9-
let body = Body::from_file("tests/fixtures/index.html").await?;
9+
let body = Body::from_path("tests/fixtures/index.html").await?;
1010
let mut res = Response::new(200);
1111
res.set_body(body);
1212
assert_eq!(res.content_type(), Some(mime::HTML));
@@ -15,7 +15,7 @@ mod tests {
1515

1616
#[async_std::test]
1717
async fn guess_binary_mime() -> http_types::Result<()> {
18-
let body = Body::from_file("tests/fixtures/nori.png").await?;
18+
let body = Body::from_path("tests/fixtures/nori.png").await?;
1919
let mut res = Response::new(200);
2020
res.set_body(body);
2121
assert_eq!(res.content_type(), Some(mime::PNG));
@@ -29,7 +29,7 @@ mod tests {
2929

3030
#[async_std::test]
3131
async fn guess_mime_fallback() -> io::Result<()> {
32-
let body = Body::from_file("tests/fixtures/unknown.custom").await?;
32+
let body = Body::from_path("tests/fixtures/unknown.custom").await?;
3333
let mut res = Response::new(200);
3434
res.set_body(body);
3535
assert_eq!(res.content_type(), Some(mime::BYTE_STREAM));
@@ -38,7 +38,7 @@ mod tests {
3838

3939
#[async_std::test]
4040
async fn parse_empty_files() -> http_types::Result<()> {
41-
let body = Body::from_file("tests/fixtures/empty.custom").await?;
41+
let body = Body::from_path("tests/fixtures/empty.custom").await?;
4242
let mut res = Response::new(200);
4343
res.set_body(body);
4444
assert_eq!(res.content_type(), Some(mime::BYTE_STREAM));

0 commit comments

Comments
 (0)