1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 14:49:20 +02:00

actix-http-test: minimize features of dependencies (#2019)

This commit is contained in:
Alex Rebert
2021-02-22 07:00:08 -05:00
committed by GitHub
parent aacec30ad1
commit 5845b3965c
3 changed files with 9 additions and 4 deletions

View File

@ -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();

View File

@ -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();