Skip to content

Commit 37887c6

Browse files
committed
use mime instead of str in assert_eq!().
1 parent 7c02ce2 commit 37887c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/response.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ async fn byte_vec_content_type() {
2020
if let Some(x) = resp.remove_header(&content_type) {
2121
header_values = x;
2222
}
23-
assert_eq!(header_values[0], "application/octet-stream");
23+
assert_eq!(header_values[0], mime::APPLICATION_OCTET_STREAM.to_string());
2424
let foo = resp.take_body().into_string().await.unwrap();
2525
assert_eq!(foo.as_bytes(), b"foo");
2626
}
@@ -36,7 +36,7 @@ async fn string_content_type() {
3636
if let Some(x) = resp.remove_header(&content_type) {
3737
header_values = x;
3838
}
39-
assert_eq!(header_values[0], "text/plain; charset=utf-8");
39+
assert_eq!(header_values[0], mime::TEXT_PLAIN_UTF_8.to_string());
4040
let foo = resp.take_body().into_string().await.unwrap();
4141
assert_eq!(foo.as_bytes(), b"foo");
4242
}

0 commit comments

Comments
 (0)