fix min feature tests

This commit is contained in:
Rob Ede 2021-02-24 02:36:29 +00:00
parent 8ca075daa8
commit 7b92e8d83d
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
3 changed files with 9 additions and 4 deletions

View File

@ -670,8 +670,6 @@ pub(crate) fn insert_slash(path: &str) -> String {
#[cfg(test)]
mod tests {
use super::*;
use http::Uri;
use std::convert::TryFrom;
#[test]
fn test_parse_static() {
@ -833,8 +831,11 @@ mod tests {
assert!(re.is_match("/user/2345/sdg"));
}
#[cfg(feature = "http")]
#[test]
fn test_parse_urlencoded_param() {
use std::convert::TryFrom;
let re = ResourceDef::new("/user/{id}/test");
let mut path = Path::new("/user/2345/test");
@ -845,7 +846,7 @@ mod tests {
assert!(re.match_path(&mut path));
assert_eq!(path.get("id").unwrap(), "qwe%25");
let uri = Uri::try_from("/user/qwe%25/test").unwrap();
let uri = http::Uri::try_from("/user/qwe%25/test").unwrap();
let mut path = Path::new(uri);
assert!(re.match_path(&mut path));
assert_eq!(path.get("id").unwrap(), "qwe%25");

View File

@ -1,3 +1,5 @@
#![cfg(feature = "connect")]
use std::{
io,
net::{IpAddr, Ipv4Addr},
@ -12,7 +14,7 @@ use futures_util::sink::SinkExt;
use actix_tls::connect::{self as actix_connect, Connect};
#[cfg(all(feature = "connect", feature = "openssl"))]
#[cfg(feature = "openssl")]
#[actix_rt::test]
async fn test_string() {
let srv = TestServer::with(|| {

View File

@ -1,3 +1,5 @@
#![cfg(feature = "connect")]
use std::{
io,
net::{Ipv4Addr, SocketAddr},