mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-25 06:39:22 +02:00
add test runtime macro (#2409)
This commit is contained in:
@ -256,7 +256,7 @@ async fn test_auto_async() {
|
||||
assert!(response.status().is_success());
|
||||
}
|
||||
|
||||
#[actix_rt::test]
|
||||
#[actix_web::test]
|
||||
async fn test_wrap() {
|
||||
let srv = actix_test::start(|| App::new().service(get_wrap));
|
||||
|
||||
|
@ -13,4 +13,6 @@ fn compile_macros() {
|
||||
t.compile_fail("tests/trybuild/route-malformed-path-fail.rs");
|
||||
|
||||
t.pass("tests/trybuild/docstring-ok.rs");
|
||||
|
||||
t.pass("tests/trybuild/test-runtime.rs");
|
||||
}
|
||||
|
6
actix-web-codegen/tests/trybuild/test-runtime.rs
Normal file
6
actix-web-codegen/tests/trybuild/test-runtime.rs
Normal file
@ -0,0 +1,6 @@
|
||||
#[actix_web::test]
|
||||
async fn my_test() {
|
||||
assert!(async { 1 }.await, 1);
|
||||
}
|
||||
|
||||
fn main() {}
|
Reference in New Issue
Block a user