Skip to content

Commit

Permalink
30DaysOfTests: password presence check with v2 store
Browse files Browse the repository at this point in the history
  • Loading branch information
conradkleinespel committed Aug 24, 2017
1 parent f491620 commit a6f762b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/password/v2.rs
Expand Up @@ -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.