Skip to content

Commit

Permalink
improves password addition test
Browse files Browse the repository at this point in the history
  • Loading branch information
conradkleinespel committed Aug 19, 2017
1 parent 55c8940 commit 07e3a35
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/password/v2.rs
Expand Up @@ -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};

Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 07e3a35

Please sign in to comment.