Skip to content

Commit

Permalink
Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronFeickert committed Jan 18, 2023
1 parent 81704dc commit 78b75b3
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions applications/tari_console_wallet/src/init/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -674,3 +674,22 @@ pub(crate) fn boot_with_password(

Ok((boot_mode, password))
}

#[cfg(test)]
mod test {
use super::get_password_feedback;

use tari_utilities::SafePassword;

#[test]
fn weak_password() {
let weak_password = SafePassword::from("weak");
assert!(get_password_feedback(&weak_password).is_some());
}

#[test]
fn strong_password() {
let strong_password = SafePassword::from("This is a reasonably strong password!");
assert!(get_password_feedback(&strong_password).is_none());
}
}

0 comments on commit 78b75b3

Please sign in to comment.