mirror of https://github.com/fafhrd91/actix-net
fix min feature tests
This commit is contained in:
parent
8ca075daa8
commit
7b92e8d83d
|
@ -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");
|
||||
|
|
|
@ -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(|| {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#![cfg(feature = "connect")]
|
||||
|
||||
use std::{
|
||||
io,
|
||||
net::{Ipv4Addr, SocketAddr},
|
||||
|
|
Loading…
Reference in New Issue