mirror of
https://github.com/actix/actix-web.git
synced 2024-11-26 03:21:08 +00:00
actix-http-test: minimize features of dependencies (#2019)
This commit is contained in:
parent
aacec30ad1
commit
5845b3965c
3 changed files with 9 additions and 4 deletions
|
@ -35,7 +35,7 @@ actix-tls = "3.0.0-beta.3"
|
|||
actix-utils = "3.0.0-beta.2"
|
||||
actix-rt = "2"
|
||||
actix-server = "2.0.0-beta.3"
|
||||
awc = "3.0.0-beta.2"
|
||||
awc = { version = "3.0.0-beta.2", default-features = false }
|
||||
|
||||
base64 = "0.13"
|
||||
bytes = "1"
|
||||
|
@ -57,5 +57,5 @@ features = ["vendored"]
|
|||
optional = true
|
||||
|
||||
[dev-dependencies]
|
||||
actix-web = "4.0.0-beta.3"
|
||||
actix-web = { version = "4.0.0-beta.3", default-features = false, features = ["cookies"] }
|
||||
actix-http = "3.0.0-beta.3"
|
||||
|
|
|
@ -983,6 +983,7 @@ mod tests {
|
|||
assert_eq!(resp.status(), StatusCode::INTERNAL_SERVER_ERROR);
|
||||
}
|
||||
|
||||
#[cfg(feature = "cookies")]
|
||||
#[test]
|
||||
fn test_cookie_parse() {
|
||||
let resp: Response = CookieParseError::EmptyName.error_response();
|
||||
|
|
|
@ -896,8 +896,9 @@ mod tests {
|
|||
|
||||
use super::*;
|
||||
use crate::body::Body;
|
||||
use crate::http::header::{HeaderValue, CONTENT_TYPE, COOKIE, SET_COOKIE};
|
||||
use crate::HttpMessage;
|
||||
use crate::http::header::{HeaderValue, CONTENT_TYPE, COOKIE};
|
||||
#[cfg(feature = "cookies")]
|
||||
use crate::{http::header::SET_COOKIE, HttpMessage};
|
||||
|
||||
#[test]
|
||||
fn test_debug() {
|
||||
|
@ -909,6 +910,7 @@ mod tests {
|
|||
assert!(dbg.contains("Response"));
|
||||
}
|
||||
|
||||
#[cfg(feature = "cookies")]
|
||||
#[test]
|
||||
fn test_response_cookies() {
|
||||
let req = crate::test::TestRequest::default()
|
||||
|
@ -946,6 +948,7 @@ mod tests {
|
|||
);
|
||||
}
|
||||
|
||||
#[cfg(feature = "cookies")]
|
||||
#[test]
|
||||
fn test_update_response_cookies() {
|
||||
let mut r = Response::Ok()
|
||||
|
@ -1097,6 +1100,7 @@ mod tests {
|
|||
assert_eq!(resp.body().get_ref(), b"test");
|
||||
}
|
||||
|
||||
#[cfg(feature = "cookies")]
|
||||
#[test]
|
||||
fn test_into_builder() {
|
||||
let mut resp: Response = "test".into();
|
||||
|
|
Loading…
Reference in a new issue