From a8ea0288cdf14365259a3d4bdd36e77e4aac7df2 Mon Sep 17 00:00:00 2001 From: cduvray Date: Sun, 20 Aug 2023 08:04:30 +0200 Subject: [PATCH] tests: (jwt_auth_to_layer) more information in case of falure --- jwt-authorizer/src/layer.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jwt-authorizer/src/layer.rs b/jwt-authorizer/src/layer.rs index c50cafe..d5f7041 100644 --- a/jwt-authorizer/src/layer.rs +++ b/jwt-authorizer/src/layer.rs @@ -461,7 +461,7 @@ mod tests { async fn jwt_auth_to_layer() { let auth1: JwtAuthorizer = JwtAuthorizer::from_secret("aaa"); #[allow(deprecated)] - let layer = auth1.layer().await; - assert!(layer.is_ok()); + let layer = auth1.layer().await.unwrap(); + assert_eq!(1, layer.auths.len()); } }