Skip to content

Commit 98da928

Browse files
committed
daemon: Fix gateway origin tests
1 parent 33f34c7 commit 98da928

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

credentialsd/src/dbus/gateway.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ impl From<WebAuthnError> for Error {
602602
mod 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
}

0 commit comments

Comments
 (0)