Daniel García
5 years ago
No known key found for this signature in database
GPG Key ID: FC8A7D14C3CD543A
1 changed files with
2 additions and
2 deletions
-
src/api/core/two_factor/email.rs
|
@ -321,14 +321,14 @@ mod tests { |
|
|
|
|
|
|
|
|
#[test] |
|
|
#[test] |
|
|
fn test_token() { |
|
|
fn test_token() { |
|
|
let result = generate_token(19).unwrap(); |
|
|
let result = crypto::generate_token(19).unwrap(); |
|
|
|
|
|
|
|
|
assert_eq!(result.chars().count(), 19); |
|
|
assert_eq!(result.chars().count(), 19); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
#[test] |
|
|
#[test] |
|
|
fn test_token_too_large() { |
|
|
fn test_token_too_large() { |
|
|
let result = generate_token(20); |
|
|
let result = crypto::generate_token(20); |
|
|
|
|
|
|
|
|
assert!(result.is_err(), "too large token should give an error"); |
|
|
assert!(result.is_err(), "too large token should give an error"); |
|
|
} |
|
|
} |
|
|