()
| 206 | |
| 207 | #[test] |
| 208 | fn rejects_expired() { |
| 209 | let secret = [0xAAu8; 32]; |
| 210 | // expiry in the distant past |
| 211 | let expiry = 1u64; |
| 212 | let hex = issue_token(&secret, 1, expiry).unwrap(); |
| 213 | assert_eq!( |
| 214 | verify_token(&hex, &secret).unwrap_err(), |
| 215 | TokenError::Expired |
| 216 | ); |
| 217 | } |
| 218 | |
| 219 | #[test] |
| 220 | fn rejects_wrong_length() { |
nothing calls this directly
no test coverage detected