Code cleanup
This commit is contained in:
@ -140,9 +140,9 @@ mod tests {
|
||||
#[test]
|
||||
fn account_encryption() -> crate::Result<()> {
|
||||
let original = Decrypted {
|
||||
name: "Account Name".into(),
|
||||
login: "StrongLogin@mail.com".into(),
|
||||
password: "StrongP@$$word!".into(),
|
||||
name: "Account Name".to_owned(),
|
||||
login: "StrongLogin@mail.com".to_owned(),
|
||||
password: "StrongP@$$word!".to_owned(),
|
||||
};
|
||||
let account = original.clone().into_account(1, TESTING_MASTER_PASSWORD);
|
||||
let decrypted = Decrypted::from_account(account, TESTING_MASTER_PASSWORD)?;
|
||||
|
@ -73,3 +73,21 @@ impl From<MasterPass> for HashedBytes<Vec<u8>, Vec<u8>> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn params_valid() {
|
||||
#[allow(clippy::no_effect_underscore_binding)]
|
||||
let _params: &Params = &PARAMS; // Initializes the PARAMS, which might panic if the passed in values are invalid
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn hashing_test() {
|
||||
const ORIGINAL: &[u8] = b"Important data";
|
||||
|
||||
assert!(HashedBytes::new(ORIGINAL).verify(ORIGINAL));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user