1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-05-08 11:33:04 +00:00

Compare commits

...

5 commits

Author SHA1 Message Date
Jon Lim d35801cf12 needed to format code 2024-04-16 22:57:44 -07:00
Jon Lim 89f78190bd sync to master branch by adding test_wrap 2024-04-16 22:55:37 -07:00
Jonathan Lim 6d3fff281b
Merge branch 'master' into scope_work 2024-04-16 22:46:57 -07:00
dependabot[bot] ba7fd048b6
build(deps): bump codecov/codecov-action from 4.2.0 to 4.3.0 (#3331)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.2.0 to 4.3.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v4.2.0...v4.3.0)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-15 01:02:44 +00:00
dependabot[bot] d98938b125
build(deps): bump taiki-e/install-action from 2.32.9 to 2.32.17 (#3332)
Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.32.9 to 2.32.17.
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/install-action/compare/v2.32.9...v2.32.17)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-15 01:02:30 +00:00
5 changed files with 21 additions and 7 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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};