Permalink
Browse files

30DaysOfTests: password presence check with v2 store

  • Loading branch information...
conradkdotcom committed Aug 24, 2017
1 parent f491620 commit a6f762b990552ffdd42bbbef9abc3bf9484a5cd4
Showing with 13 additions and 0 deletions.
  1. +13 −0 src/password/v2.rs
View
@@ -652,4 +652,17 @@ mod test {
Password::new("name", "username", "password")
);
}
#[test]
fn test_has_password() {
let mut store = PasswordStore::new("****").unwrap();
assert!(!store.has_password("name"));
assert!(
store
.add_password(Password::new("name", "username", "password"))
.is_ok()
);
assert!(store.has_password("name"));
}
}

0 comments on commit a6f762b

Please sign in to comment.