mirror of
https://github.com/actix/actix-web.git
synced 2024-05-08 11:33:04 +00:00
Compare commits
5 commits
6eabb23bac
...
d35801cf12
Author | SHA1 | Date | |
---|---|---|---|
d35801cf12 | |||
89f78190bd | |||
6d3fff281b | |||
ba7fd048b6 | |||
d98938b125 |
6
.github/workflows/ci-post-merge.yml
vendored
6
.github/workflows/ci-post-merge.yml
vendored
|
@ -45,7 +45,7 @@ jobs:
|
|||
toolchain: ${{ matrix.version.version }}
|
||||
|
||||
- name: Install cargo-hack and cargo-ci-cache-clean
|
||||
uses: taiki-e/install-action@v2.32.9
|
||||
uses: taiki-e/install-action@v2.32.17
|
||||
with:
|
||||
tool: cargo-hack,cargo-ci-cache-clean
|
||||
|
||||
|
@ -88,7 +88,7 @@ jobs:
|
|||
uses: actions-rust-lang/setup-rust-toolchain@v1.8.0
|
||||
|
||||
- name: Install cargo-hack
|
||||
uses: taiki-e/install-action@v2.32.9
|
||||
uses: taiki-e/install-action@v2.32.17
|
||||
with:
|
||||
tool: cargo-hack
|
||||
|
||||
|
@ -109,7 +109,7 @@ jobs:
|
|||
uses: actions-rust-lang/setup-rust-toolchain@v1.8.0
|
||||
|
||||
- name: Install nextest
|
||||
uses: taiki-e/install-action@v2.32.9
|
||||
uses: taiki-e/install-action@v2.32.17
|
||||
with:
|
||||
tool: nextest
|
||||
|
||||
|
|
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -50,7 +50,7 @@ jobs:
|
|||
toolchain: ${{ matrix.version.version }}
|
||||
|
||||
- name: Install cargo-hack and cargo-ci-cache-clean
|
||||
uses: taiki-e/install-action@v2.32.9
|
||||
uses: taiki-e/install-action@v2.32.17
|
||||
with:
|
||||
tool: cargo-hack,cargo-ci-cache-clean
|
||||
|
||||
|
|
4
.github/workflows/coverage.yml
vendored
4
.github/workflows/coverage.yml
vendored
|
@ -23,7 +23,7 @@ jobs:
|
|||
components: llvm-tools-preview
|
||||
|
||||
- name: Install cargo-llvm-cov
|
||||
uses: taiki-e/install-action@v2.32.9
|
||||
uses: taiki-e/install-action@v2.32.17
|
||||
with:
|
||||
tool: cargo-llvm-cov
|
||||
|
||||
|
@ -31,7 +31,7 @@ jobs:
|
|||
run: cargo llvm-cov --workspace --all-features --codecov --output-path codecov.json
|
||||
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v4.2.0
|
||||
uses: codecov/codecov-action@v4.3.0
|
||||
with:
|
||||
files: codecov.json
|
||||
fail_ci_if_error: true
|
||||
|
|
2
.github/workflows/lint.yml
vendored
2
.github/workflows/lint.yml
vendored
|
@ -82,7 +82,7 @@ jobs:
|
|||
toolchain: nightly-2023-08-25
|
||||
|
||||
- name: Install cargo-public-api
|
||||
uses: taiki-e/install-action@v2.32.9
|
||||
uses: taiki-e/install-action@v2.32.17
|
||||
with:
|
||||
tool: cargo-public-api
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ use actix_web::{
|
|||
http::{
|
||||
self,
|
||||
header::{HeaderName, HeaderValue},
|
||||
StatusCode,
|
||||
},
|
||||
web, App, Error, HttpRequest, HttpResponse, Responder,
|
||||
};
|
||||
|
@ -371,6 +372,19 @@ async fn test_auto_async() {
|
|||
assert!(response.status().is_success());
|
||||
}
|
||||
|
||||
#[actix_web::test]
|
||||
async fn test_wrap() {
|
||||
let srv = actix_test::start(|| App::new().service(get_wrap));
|
||||
|
||||
let request = srv.request(http::Method::GET, srv.url("/test/wrap"));
|
||||
let mut response = request.send().await.unwrap();
|
||||
assert_eq!(response.status(), StatusCode::NOT_FOUND);
|
||||
assert!(response.headers().contains_key("custom-header"));
|
||||
let body = response.body().await.unwrap();
|
||||
let body = String::from_utf8(body.to_vec()).unwrap();
|
||||
assert!(body.contains("wrong number of parameters"));
|
||||
}
|
||||
|
||||
#[scope("/test")]
|
||||
mod scope_module {
|
||||
use actix_web::{delete, get, post, route, routes, web, HttpResponse, Responder};
|
||||
|
|
Loading…
Reference in a new issue