@@ -6,7 +6,7 @@ mod tests {
6
6
7
7
#[ async_std:: test]
8
8
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 ?;
10
10
let mut res = Response :: new ( 200 ) ;
11
11
res. set_body ( body) ;
12
12
assert_eq ! ( res. content_type( ) , Some ( mime:: HTML ) ) ;
@@ -15,7 +15,7 @@ mod tests {
15
15
16
16
#[ async_std:: test]
17
17
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 ?;
19
19
let mut res = Response :: new ( 200 ) ;
20
20
res. set_body ( body) ;
21
21
assert_eq ! ( res. content_type( ) , Some ( mime:: PNG ) ) ;
@@ -29,7 +29,7 @@ mod tests {
29
29
30
30
#[ async_std:: test]
31
31
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 ?;
33
33
let mut res = Response :: new ( 200 ) ;
34
34
res. set_body ( body) ;
35
35
assert_eq ! ( res. content_type( ) , Some ( mime:: BYTE_STREAM ) ) ;
@@ -38,7 +38,7 @@ mod tests {
38
38
39
39
#[ async_std:: test]
40
40
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 ?;
42
42
let mut res = Response :: new ( 200 ) ;
43
43
res. set_body ( body) ;
44
44
assert_eq ! ( res. content_type( ) , Some ( mime:: BYTE_STREAM ) ) ;
0 commit comments