forked from Proxmox/proxmox
tfa: rustfmt
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
4554034d32
commit
6f8173f67a
@ -524,10 +524,7 @@ fn test_otp() {
|
|||||||
let parsed: Totp = uri.parse().expect("failed to parse otp uri");
|
let parsed: Totp = uri.parse().expect("failed to parse otp uri");
|
||||||
assert_eq!(parsed, hotp);
|
assert_eq!(parsed, hotp);
|
||||||
assert_eq!(parsed.issuer, None);
|
assert_eq!(parsed.issuer, None);
|
||||||
assert_eq!(
|
assert_eq!(parsed.account_name.as_deref(), Some("My Account"));
|
||||||
parsed.account_name.as_deref(),
|
|
||||||
Some("My Account")
|
|
||||||
);
|
|
||||||
|
|
||||||
const SECRET_2: &str = "a60b1b20679b1a64e21a";
|
const SECRET_2: &str = "a60b1b20679b1a64e21a";
|
||||||
const EXPECTED: &str = "7757717";
|
const EXPECTED: &str = "7757717";
|
||||||
@ -557,12 +554,6 @@ fn test_otp() {
|
|||||||
let uri = totp.to_uri().expect("failed to create otpauth uri");
|
let uri = totp.to_uri().expect("failed to create otpauth uri");
|
||||||
let parsed: Totp = uri.parse().expect("failed to parse otp uri");
|
let parsed: Totp = uri.parse().expect("failed to parse otp uri");
|
||||||
assert_eq!(parsed, totp);
|
assert_eq!(parsed, totp);
|
||||||
assert_eq!(
|
assert_eq!(parsed.issuer.as_deref(), Some("An Issuer"));
|
||||||
parsed.issuer.as_deref(),
|
assert_eq!(parsed.account_name.as_deref(), Some("The Account Name"));
|
||||||
Some("An Issuer")
|
|
||||||
);
|
|
||||||
assert_eq!(
|
|
||||||
parsed.account_name.as_deref(),
|
|
||||||
Some("The Account Name")
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
@ -521,8 +521,7 @@ mod test {
|
|||||||
response: super::RegistrationResponse,
|
response: super::RegistrationResponse,
|
||||||
}
|
}
|
||||||
|
|
||||||
let ts: TestChallenge =
|
let ts: TestChallenge = serde_json::from_str(data).expect("failed to parse json test data");
|
||||||
serde_json::from_str(data).expect("failed to parse json test data");
|
|
||||||
|
|
||||||
let context = super::U2f::new(TEST_APPID.to_string(), TEST_APPID.to_string());
|
let context = super::U2f::new(TEST_APPID.to_string(), TEST_APPID.to_string());
|
||||||
let res = context
|
let res = context
|
||||||
@ -545,8 +544,7 @@ mod test {
|
|||||||
response: super::AuthResponse,
|
response: super::AuthResponse,
|
||||||
}
|
}
|
||||||
|
|
||||||
let ts: TestChallenge =
|
let ts: TestChallenge = serde_json::from_str(data).expect("failed to parse json test data");
|
||||||
serde_json::from_str(data).expect("failed to parse json test data");
|
|
||||||
|
|
||||||
let context = super::U2f::new(TEST_APPID.to_string(), TEST_APPID.to_string());
|
let context = super::U2f::new(TEST_APPID.to_string(), TEST_APPID.to_string());
|
||||||
let res = context
|
let res = context
|
||||||
|
Loading…
Reference in New Issue
Block a user