tests: add more badssl tests for rustls
This commit is contained in:
		
				
					committed by
					
						 Sean McArthur
						Sean McArthur
					
				
			
			
				
	
			
			
			
						parent
						
							3033f11639
						
					
				
				
					commit
					8027a2894a
				
			| @@ -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() { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user