tests: add more badssl tests for rustls

This commit is contained in:
Luca Bruno
2019-08-18 20:00:24 +00:00
committed by Sean McArthur
parent 3033f11639
commit 8027a2894a

View File

@@ -10,6 +10,19 @@ fn test_badssl_modern() {
assert!(text.contains("<title>mozilla-modern.badssl.com</title>")); assert!(text.contains("<title>mozilla-modern.badssl.com</title>"));
} }
#[cfg(feature = "rustls-tls")]
#[test]
fn test_rustls_badssl_modern() {
let text = reqwest::Client::builder()
.use_rustls_tls()
.build().unwrap()
.get("https://mozilla-modern.badssl.com/")
.send().unwrap()
.text().unwrap();
assert!(text.contains("<title>mozilla-modern.badssl.com</title>"));
}
#[cfg(feature = "tls")] #[cfg(feature = "tls")]
#[test] #[test]
fn test_badssl_self_signed() { fn test_badssl_self_signed() {