File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -602,7 +602,7 @@ impl From<WebAuthnError> for Error {
602602mod test {
603603 use credentialsd_common:: model:: WebAuthnError ;
604604
605- use crate :: webauthn:: { NavigationContext , Origin } ;
605+ use crate :: webauthn:: { AppId , NavigationContext , Origin } ;
606606
607607 use super :: check_origin_from_privileged_client;
608608 fn check_same_origin ( origin : & str ) -> Result < NavigationContext , WebAuthnError > {
@@ -611,18 +611,18 @@ mod test {
611611 }
612612
613613 #[ test]
614- fn test_only_https_origins ( ) {
614+ fn test_https_origin_returns_success ( ) {
615615 assert ! ( matches!(
616616 check_same_origin( "https://example.com" ) ,
617617 Ok ( NavigationContext :: SameOrigin ( Origin :: Https { host, .. } ) ) if host == "example.com"
618618 ) )
619619 }
620620
621621 #[ test]
622- fn test_privileged_client_cannot_set_http_origins ( ) {
622+ fn test_throws_security_error_when_passing_app_id_origin ( ) {
623623 assert ! ( matches!(
624- check_same_origin( "http:// example.com " ) ,
624+ check_same_origin( "app:com. example.App " ) ,
625625 Err ( WebAuthnError :: SecurityError )
626- ) ) ;
626+ ) )
627627 }
628628}
You can’t perform that action at this time.
0 commit comments