Permalink
Browse files

improves password addition test

  • Loading branch information...
conradkdotcom committed Aug 19, 2017
1 parent 55c8940 commit 07e3a35b81f3747882ea8e5d8f534a3962d640cb
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/password/v2.rs
View
@@ -505,6 +505,7 @@ impl PasswordStore {
#[cfg(test)]
mod test {
use super::get_default_scrypt_params;
use password::PasswordError;
use password::v2::{PasswordStore, Password, generate_encryption_key, generate_random_iv,
generate_random_salt};
@@ -561,11 +562,10 @@ mod test {
}
// cant add two passwords with same app name
assert!(
store
.add_password(Password::new("name", "username", "password"))
.is_err()
);
match store.add_password(Password::new("name", "username", "password")) {
Err(PasswordError::AppExistsError) => {}
_ => panic!(),
}
}
#[test]

0 comments on commit 07e3a35

Please sign in to comment.