macro_rules! test_case {
(
async fn $name:ident($case:ident: &APITestCase) $body:block
) => { ... };
}Expand description
Helper macro for defining test cases with automatic setup/teardown
ยงExample
test_case! {
async fn test_get_users(case: &APITestCase) {
let client = case.client().await;
let response = client.get("/api/users/").await.unwrap();
response.assert_ok();
}
}