11use passkey_types:: ctap2:: { Aaguid , Flags } ;
22
3- use crate :: { Authenticator , CredentialIdLength , MockUserValidationMethod , UserCheck } ;
3+ use crate :: {
4+ Authenticator , CredentialIdLength , MockUserValidationMethod , UserCheck , user_validation:: UiHint ,
5+ } ;
46
57#[ tokio:: test]
68async fn check_user_does_not_check_up_or_uv_when_not_requested ( ) {
@@ -31,7 +33,10 @@ async fn check_user_does_not_check_up_or_uv_when_not_requested() {
3133 } ;
3234
3335 // Act
34- let result = authenticator. check_user ( & options, None ) . await . unwrap ( ) ;
36+ let result = authenticator
37+ . check_user ( UiHint :: InformNoCredentialsFound , & options)
38+ . await
39+ . unwrap ( ) ;
3540
3641 // Assert
3742 assert_eq ! ( result, Flags :: empty( ) ) ;
@@ -66,7 +71,10 @@ async fn check_user_checks_up_when_requested() {
6671 } ;
6772
6873 // Act
69- let result = authenticator. check_user ( & options, None ) . await . unwrap ( ) ;
74+ let result = authenticator
75+ . check_user ( UiHint :: InformNoCredentialsFound , & options)
76+ . await
77+ . unwrap ( ) ;
7078
7179 // Assert
7280 assert_eq ! ( result, Flags :: UP ) ;
@@ -104,7 +112,10 @@ async fn check_user_checks_uv_when_requested() {
104112 } ;
105113
106114 // Act
107- let result = authenticator. check_user ( & options, None ) . await . unwrap ( ) ;
115+ let result = authenticator
116+ . check_user ( UiHint :: InformNoCredentialsFound , & options)
117+ . await
118+ . unwrap ( ) ;
108119
109120 // Assert
110121 assert_eq ! ( result, Flags :: UP | Flags :: UV ) ;
@@ -139,7 +150,9 @@ async fn check_user_returns_operation_denied_when_up_was_requested_but_not_retur
139150 } ;
140151
141152 // Act
142- let result = authenticator. check_user ( & options, None ) . await ;
153+ let result = authenticator
154+ . check_user ( UiHint :: InformNoCredentialsFound , & options)
155+ . await ;
143156
144157 // Assert
145158 assert_eq ! (
@@ -180,7 +193,9 @@ async fn check_user_returns_operation_denied_when_uv_was_requested_but_not_retur
180193 } ;
181194
182195 // Act
183- let result = authenticator. check_user ( & options, None ) . await ;
196+ let result = authenticator
197+ . check_user ( UiHint :: InformNoCredentialsFound , & options)
198+ . await ;
184199
185200 // Assert
186201 assert_eq ! (
@@ -207,7 +222,9 @@ async fn check_user_returns_unsupported_option_when_uv_was_requested_but_is_not_
207222 } ;
208223
209224 // Act
210- let result = authenticator. check_user ( & options, None ) . await ;
225+ let result = authenticator
226+ . check_user ( UiHint :: InformNoCredentialsFound , & options)
227+ . await ;
211228
212229 // Assert
213230 assert_eq ! (
@@ -249,7 +266,10 @@ async fn check_user_returns_up_and_uv_flags_when_neither_up_or_uv_was_requested_
249266 } ;
250267
251268 // Act
252- let result = authenticator. check_user ( & options, None ) . await . unwrap ( ) ;
269+ let result = authenticator
270+ . check_user ( UiHint :: InformNoCredentialsFound , & options)
271+ . await
272+ . unwrap ( ) ;
253273
254274 // Assert
255275 assert_eq ! ( result, Flags :: UP | Flags :: UV ) ;
0 commit comments