mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-26 00:00:23 +02:00
examples: Simplify Request and Response construction (#3653)
This commit is contained in:
@@ -81,12 +81,7 @@ mod tests {
|
||||
#[tokio::test]
|
||||
async fn test_main() {
|
||||
let response = app()
|
||||
.oneshot(
|
||||
Request::builder()
|
||||
.uri("/greet/Foo")
|
||||
.body(Body::empty())
|
||||
.unwrap(),
|
||||
)
|
||||
.oneshot(Request::get("/greet/Foo").body(Body::empty()).unwrap())
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(response.status(), StatusCode::OK);
|
||||
|
||||
Reference in New Issue
Block a user