1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-26 23:17:42 +02:00

migrate integration testing to new crate (#2112)

This commit is contained in:
Rob Ede
2021-04-02 08:26:59 +01:00
committed by GitHub
parent 50dc13f280
commit c54a0713de
41 changed files with 789 additions and 644 deletions

View File

@ -283,10 +283,9 @@ fn rebuild_uri(res: &ClientResponse, org_uri: Uri) -> Result<Uri, SendRequestErr
#[cfg(test)]
mod tests {
use actix_web::{test::start, web, App, Error, HttpResponse};
use actix_web::{web, App, Error, HttpResponse};
use super::*;
use crate::ClientBuilder;
#[actix_rt::test]
@ -296,7 +295,7 @@ mod tests {
.wrap(Redirect::new().max_redirect_times(10))
.finish();
let srv = start(|| {
let srv = actix_test::start(|| {
App::new()
.service(web::resource("/test").route(web::to(|| async {
Ok::<_, Error>(HttpResponse::BadRequest())
@ -323,7 +322,7 @@ mod tests {
.connector(crate::Connector::new())
.finish();
let srv = start(|| {
let srv = actix_test::start(|| {
App::new()
.service(web::resource("/").route(web::to(|| async {
Ok::<_, Error>(