Merge pull request #2 from jannic/add-test-cases
Some checks failed
continuous-integration/drone/push Build is failing

Add test case for hash calculations
This commit is contained in:
shimunn
2019-10-12 13:24:33 +02:00
committed by GitHub
2 changed files with 22 additions and 0 deletions

View File

@@ -169,4 +169,12 @@ mod test {
assert_eq!("ask".parse::<InputSalt>().unwrap(), InputSalt::AskPassword);
assert_eq!("lol".parse::<InputSalt>().unwrap(), InputSalt::default());
}
#[test]
fn input_salt_obtain() {
assert_eq!(
InputSalt::String("abc".into()).obtain(&PasswordHelper::Stdin).unwrap(),
[186, 120, 22, 191, 143, 1, 207, 234, 65, 65, 64, 222, 93, 174, 34, 35, 176, 3, 97, 163, 150, 23, 122, 156, 180, 16, 255, 97, 242, 0, 21, 173]
)
}
}