diff options
Diffstat (limited to 'crates/shirabe/tests/util/stream_context_factory_test.rs')
| -rw-r--r-- | crates/shirabe/tests/util/stream_context_factory_test.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/crates/shirabe/tests/util/stream_context_factory_test.rs b/crates/shirabe/tests/util/stream_context_factory_test.rs index ad123aa..284077b 100644 --- a/crates/shirabe/tests/util/stream_context_factory_test.rs +++ b/crates/shirabe/tests/util/stream_context_factory_test.rs @@ -324,16 +324,16 @@ fn test_ssl_proxy() { )]); assert_eq!(expected_options, options); } else { - match StreamContextFactory::get_context( - "http://example.org", - IndexMap::new(), - IndexMap::new(), - ) { - // The catch in PHP asserts the exception is a TransportException; the return type - // here already guarantees that. - Ok(_) => panic!(), - Err(_) => {} - } + // The catch in PHP asserts the exception is a TransportException; the return type + // here already guarantees that. + assert!( + StreamContextFactory::get_context( + "http://example.org", + IndexMap::new(), + IndexMap::new(), + ) + .is_err() + ); } } } @@ -351,7 +351,7 @@ fn test_ensure_thatfix_http_header_field_moves_content_type_to_end_of_options() ), )]), )]); - let expected_header = vec