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

update cargo files

This commit is contained in:
Nikolay Kim
2019-03-26 12:50:51 -07:00
parent 50c0ddb3cd
commit 9451ba71f4
10 changed files with 48 additions and 41 deletions

View File

@ -1,7 +1,7 @@
[package]
name = "actix-web-codegen"
description = "Actix web codegen macros"
version = "0.1.0"
version = "0.1.0-alpha.1"
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
license = "MIT/Apache-2.0"
edition = "2018"
@ -16,5 +16,5 @@ syn = { version = "0.15", features = ["full", "parsing"] }
[dev-dependencies]
actix-web = { path = ".." }
actix-http = { git = "https://github.com/actix/actix-http.git", features=["ssl"] }
actix-http-test = { git = "https://github.com/actix/actix-http.git", features=["ssl"] }
actix-http = { path = "../actix-http/", features=["ssl"] }
actix-http-test = { path = "../test-server/", features=["ssl"] }

View File

@ -1,6 +1,6 @@
use actix_http::HttpService;
use actix_http_test::TestServer;
use actix_web::{get, App, HttpResponse, Responder};
use actix_web::{get, http, App, HttpResponse, Responder};
#[get("/test")]
fn test() -> impl Responder {
@ -11,7 +11,7 @@ fn test() -> impl Responder {
fn test_body() {
let mut srv = TestServer::new(|| HttpService::new(App::new().service(test)));
let request = srv.get().uri(srv.url("/test")).finish().unwrap();
let response = srv.send_request(request).unwrap();
let request = srv.request(http::Method::GET, srv.url("/test"));
let response = srv.block_on(request.send()).unwrap();
assert!(response.status().is_success());
}