File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Expand file tree Collapse file tree 3 files changed +10
-1
lines changed File renamed without changes.
Original file line number Diff line number Diff line change @@ -27,7 +27,16 @@ async fn guess_binary_mime() -> http_types::Result<()> {
27
27
28
28
#[ async_std:: test]
29
29
async fn guess_mime_fallback ( ) -> io:: Result < ( ) > {
30
- let body = Body :: from_file ( "tests/fixtures/unknown.custom_ext" ) . await ?;
30
+ let body = Body :: from_file ( "tests/fixtures/unknown.custom" ) . await ?;
31
+ let mut res = Response :: new ( 200 ) ;
32
+ res. set_body ( body) ;
33
+ assert_eq ! ( res. content_type( ) , Some ( mime:: BYTE_STREAM ) ) ;
34
+ Ok ( ( ) )
35
+ }
36
+
37
+ #[ async_std:: test]
38
+ async fn parse_empty_files ( ) -> http_types:: Result < ( ) > {
39
+ let body = Body :: from_file ( "tests/fixtures/empty.custom" ) . await ?;
31
40
let mut res = Response :: new ( 200 ) ;
32
41
res. set_body ( body) ;
33
42
assert_eq ! ( res. content_type( ) , Some ( mime:: BYTE_STREAM ) ) ;
You can’t perform that action at this time.
0 commit comments