1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-24 07:53:00 +01:00

prep test server release

This commit is contained in:
Nikolay Kim 2019-07-16 10:21:52 +06:00
parent 6f71409355
commit c45728ac01
4 changed files with 10 additions and 8 deletions

View File

@ -5,7 +5,6 @@
### Added ### Added
* Add `Responder` impl for `(T, StatusCode) where T: Responder` * Add `Responder` impl for `(T, StatusCode) where T: Responder`
* Add `delete`, `options`, `patch` methods to `TestServerRunner`
### Changed ### Changed

View File

@ -644,9 +644,8 @@ pub(crate) mod tests {
#[test] #[test]
fn test_tuple_responder_with_status_code() { fn test_tuple_responder_with_status_code() {
let req = TestRequest::default().to_http_request(); let req = TestRequest::default().to_http_request();
let res = block_on( let res =
("test".to_string(), StatusCode::BAD_REQUEST).respond_to(&req) block_on(("test".to_string(), StatusCode::BAD_REQUEST).respond_to(&req))
)
.unwrap(); .unwrap();
assert_eq!(res.status(), StatusCode::BAD_REQUEST); assert_eq!(res.status(), StatusCode::BAD_REQUEST);
assert_eq!(res.body().bin_ref(), b"test"); assert_eq!(res.body().bin_ref(), b"test");
@ -655,7 +654,7 @@ pub(crate) mod tests {
let res = block_on( let res = block_on(
("test".to_string(), StatusCode::OK) ("test".to_string(), StatusCode::OK)
.with_header("content-type", "json") .with_header("content-type", "json")
.respond_to(&req) .respond_to(&req),
) )
.unwrap(); .unwrap();
assert_eq!(res.status(), StatusCode::OK); assert_eq!(res.status(), StatusCode::OK);

View File

@ -1,5 +1,9 @@
# Changes # Changes
## [0.2.3] - 2019-07-16
* Add `delete`, `options`, `patch` methods to `TestServerRunner`
## [0.2.2] - 2019-06-16 ## [0.2.2] - 2019-06-16
* Add .put() and .sput() methods * Add .put() and .sput() methods

View File

@ -1,6 +1,6 @@
[package] [package]
name = "actix-http-test" name = "actix-http-test"
version = "0.2.2" version = "0.2.3"
authors = ["Nikolay Kim <fafhrd91@gmail.com>"] authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
description = "Actix http test server" description = "Actix http test server"
readme = "README.md" readme = "README.md"
@ -35,7 +35,7 @@ actix-rt = "0.2.2"
actix-service = "0.4.1" actix-service = "0.4.1"
actix-server = "0.5.1" actix-server = "0.5.1"
actix-utils = "0.4.1" actix-utils = "0.4.1"
awc = "0.2.1" awc = "0.2.2"
base64 = "0.10" base64 = "0.10"
bytes = "0.4" bytes = "0.4"