Add missing unit tests for Cached and WithRejection
This commit is contained in:
15
src/test.rs
15
src/test.rs
@@ -424,18 +424,33 @@ async fn test_main() -> anyhow::Result<()> {
|
|||||||
test_executor
|
test_executor
|
||||||
.execute::<Cached<Parameters>>(Method::POST, extra::route::CACHED)
|
.execute::<Cached<Parameters>>(Method::POST, extra::route::CACHED)
|
||||||
.await?;
|
.await?;
|
||||||
|
test_executor
|
||||||
|
.execute::<Cached<Parameters>>(Method::POST, extra::route::CACHED_EX)
|
||||||
|
.await?;
|
||||||
test_executor
|
test_executor
|
||||||
.execute::<WithRejection<Parameters, ValidWithRejectionRejection>>(
|
.execute::<WithRejection<Parameters, ValidWithRejectionRejection>>(
|
||||||
Method::POST,
|
Method::POST,
|
||||||
extra::route::WITH_REJECTION,
|
extra::route::WITH_REJECTION,
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
|
test_executor
|
||||||
|
.execute::<WithRejection<Parameters, ValidWithRejectionRejection>>(
|
||||||
|
Method::POST,
|
||||||
|
extra::route::WITH_REJECTION_EX,
|
||||||
|
)
|
||||||
|
.await?;
|
||||||
test_executor
|
test_executor
|
||||||
.execute::<WithRejection<Valid<Parameters>, WithRejectionValidRejection<ParametersRejection>>>(
|
.execute::<WithRejection<Valid<Parameters>, WithRejectionValidRejection<ParametersRejection>>>(
|
||||||
Method::POST,
|
Method::POST,
|
||||||
extra::route::WITH_REJECTION_VALID,
|
extra::route::WITH_REJECTION_VALID,
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
|
test_executor
|
||||||
|
.execute::<WithRejection<Valid<Parameters>, WithRejectionValidRejection<ParametersRejection>>>(
|
||||||
|
Method::POST,
|
||||||
|
extra::route::WITH_REJECTION_VALID_EX,
|
||||||
|
)
|
||||||
|
.await?;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "extra_typed_path")]
|
#[cfg(feature = "extra_typed_path")]
|
||||||
|
|||||||
Reference in New Issue
Block a user