Fix unit tests for get_url change

This commit is contained in:
timvisee 2023-01-12 14:22:12 +01:00
parent d866af6b06
commit d2c6ae62d6
No known key found for this signature in database
GPG Key ID: B8DB720BC383E172
2 changed files with 3 additions and 3 deletions

View File

@ -52,6 +52,6 @@ mod test {
fn get_url_steam() {
let totp = TOTP::new_steam("TestSecretSuperSecret".into(), "constantoine".into());
let url = totp.get_url();
assert_eq!(url.as_str(), "otpauth://steam/Steam:constantoine?issuer=Steam&secret=KRSXG5CTMVRXEZLUKN2XAZLSKNSWG4TFOQ&digits=5&algorithm=SHA1");
assert_eq!(url.as_str(), "otpauth://steam/Steam:constantoine?secret=KRSXG5CTMVRXEZLUKN2XAZLSKNSWG4TFOQ&digits=5&algorithm=SHA1&issuer=Steam");
}
}
}

View File

@ -1278,7 +1278,7 @@ mod tests {
let hash_digest = Sha512::digest(data);
assert_eq!(
format!("{:x}", hash_digest).as_str(),
"025809c9db9c2c918930e018549c90929a083ee757156737812bad40ded64312c1526c73d8f2f59d5c203b97141ddfc331b1192e234f4f43257f50a6d05e382f"
"2b6e6205bf1cea547b20af23c504eab8062af96c642c0d76afb3df6695fa231b210b7ae435e34bea1ef8b91216fd3a0f7065e7992f1703e0737600b464a1083e"
);
}