mirror of https://github.com/fafhrd91/actix-web
update changelogs
This commit is contained in:
parent
f934afd17b
commit
8291ff5aaf
|
@ -9,14 +9,20 @@
|
|||
* Align `DefaultHeader` method terminology, deprecating previous methods. [#2510]
|
||||
* Response service types in `ErrorHandlers` middleware now use `ServiceResponse<EitherBody<B>>` to allow changing the body type. [#2515]
|
||||
* Both variants in `ErrorHandlerResponse` now use `ServiceResponse<EitherBody<B>>`. [#2515]
|
||||
* Rename `test::{default_service => simple_service}`. Old name is deprecated. [#2518]
|
||||
* Rename `test::{read_response_json => call_and_read_body_json}`. Old name is deprecated. [#2518]
|
||||
* Rename `test::{read_response => call_and_read_body}`. Old name is deprecated. [#2518]
|
||||
* Relax body type and error bounds on test utilities.
|
||||
|
||||
### Removed
|
||||
* Top-level `EitherExtractError` export. [#2510]
|
||||
* Conversion implementations for `either` crate. [#2516]
|
||||
* `test::load_stream` and `test::load_body`; replace usage with `body::to_bytes`. [#2518]
|
||||
|
||||
[#2510]: https://github.com/actix/actix-web/pull/2510
|
||||
[#2515]: https://github.com/actix/actix-web/pull/2515
|
||||
[#2516]: https://github.com/actix/actix-web/pull/2516
|
||||
[#2518]: https://github.com/actix/actix-web/pull/2518
|
||||
|
||||
|
||||
## 4.0.0-beta.14 - 2021-12-11
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
# Changes
|
||||
|
||||
## Unreleased - 2021-xx-xx
|
||||
* Re-export `actix_http::body::to_bytes`. [#2518]
|
||||
* Update `actix_web::test` re-exports. [#2518]
|
||||
|
||||
[#2518]: https://github.com/actix/actix-web/pull/2518
|
||||
|
||||
|
||||
## 0.1.0-beta.8 - 2021-12-11
|
||||
|
|
|
@ -42,8 +42,8 @@ use actix_http::{header::HeaderMap, ws, HttpService, Method, Request, Response};
|
|||
pub use actix_http_test::unused_addr;
|
||||
use actix_service::{map_config, IntoServiceFactory, ServiceFactory, ServiceFactoryExt as _};
|
||||
pub use actix_web::test::{
|
||||
call_service, init_service, ok_service, read_body, read_body_json, read_response,
|
||||
read_response_json, simple_service, TestRequest,
|
||||
call_and_read_body, call_and_read_body_json, call_service, init_service, ok_service,
|
||||
read_body, read_body_json, simple_service, TestRequest,
|
||||
};
|
||||
use actix_web::{
|
||||
body::MessageBody,
|
||||
|
|
|
@ -344,7 +344,7 @@ mod tests {
|
|||
.insert_header((header::CONTENT_TYPE, "application/json"))
|
||||
.to_request();
|
||||
|
||||
let result = read_response(&app, put_req).await;
|
||||
let result = call_and_read_body(&app, put_req).await;
|
||||
assert_eq!(result, Bytes::from_static(b"put!"));
|
||||
|
||||
let patch_req = TestRequest::patch()
|
||||
|
@ -352,11 +352,11 @@ mod tests {
|
|||
.insert_header((header::CONTENT_TYPE, "application/json"))
|
||||
.to_request();
|
||||
|
||||
let result = read_response(&app, patch_req).await;
|
||||
let result = call_and_read_body(&app, patch_req).await;
|
||||
assert_eq!(result, Bytes::from_static(b"patch!"));
|
||||
|
||||
let delete_req = TestRequest::delete().uri("/index.html").to_request();
|
||||
let result = read_response(&app, delete_req).await;
|
||||
let result = call_and_read_body(&app, delete_req).await;
|
||||
assert_eq!(result, Bytes::from_static(b"delete!"));
|
||||
}
|
||||
|
||||
|
@ -381,7 +381,7 @@ mod tests {
|
|||
.set_payload(payload)
|
||||
.to_request();
|
||||
|
||||
let result: Person = read_response_json(&app, req).await;
|
||||
let result: Person = call_and_read_body_json(&app, req).await;
|
||||
assert_eq!(&result.id, "12345");
|
||||
}
|
||||
|
||||
|
@ -424,7 +424,7 @@ mod tests {
|
|||
|
||||
assert_eq!(req.content_type(), "application/x-www-form-urlencoded");
|
||||
|
||||
let result: Person = read_response_json(&app, req).await;
|
||||
let result: Person = call_and_read_body_json(&app, req).await;
|
||||
assert_eq!(&result.id, "12345");
|
||||
assert_eq!(&result.name, "User name");
|
||||
}
|
||||
|
@ -444,7 +444,7 @@ mod tests {
|
|||
.insert_header((header::CONTENT_TYPE, "application/json"))
|
||||
.to_request();
|
||||
|
||||
let result = read_response(&app, req).await;
|
||||
let result = call_and_read_body(&app, req).await;
|
||||
assert_eq!(result, Bytes::from_static(b"welcome!"));
|
||||
}
|
||||
|
||||
|
@ -467,7 +467,7 @@ mod tests {
|
|||
|
||||
assert_eq!(req.content_type(), "application/json");
|
||||
|
||||
let result: Person = read_response_json(&app, req).await;
|
||||
let result: Person = call_and_read_body_json(&app, req).await;
|
||||
assert_eq!(&result.id, "12345");
|
||||
assert_eq!(&result.name, "User name");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue