Explicitly check for token expiration error (#4836)
This commit is contained in:
parent
5e990d569b
commit
99db7f2a82
1 changed files with 5 additions and 1 deletions
|
@ -1539,7 +1539,11 @@ mod tests {
|
||||||
let mut sess = Session::default();
|
let mut sess = Session::default();
|
||||||
let res = token(&ds, &mut sess, &enc).await;
|
let res = token(&ds, &mut sess, &enc).await;
|
||||||
|
|
||||||
assert!(res.is_err(), "Unexpected success signing in with expired token: {:?}", res);
|
match res {
|
||||||
|
Err(Error::ExpiredToken) => {} // ok
|
||||||
|
Err(err) => panic!("Unexpected error signing in with expired token: {:?}", err),
|
||||||
|
res => panic!("Unexpected success signing in with expired token: {:?}", res),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
|
|
Loading…
Reference in a new issue