mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-06 05:17:42 +00:00
test StorageInfoHandler
This commit is contained in:
@@ -10,7 +10,10 @@ fn test() {
|
||||
"bbb": "bbb"
|
||||
});
|
||||
|
||||
let jwt_token = encode(b"aaaa", &claims).unwrap();
|
||||
let new_claims = decode(&jwt_token, b"aaaa").unwrap();
|
||||
assert_eq!(new_claims.claims, claims);
|
||||
let jwt_token = encode(b"aaaa", &claims).unwrap_or_default();
|
||||
let new_claims = match decode(&jwt_token, b"aaaa") {
|
||||
Ok(res) => Some(res.claims),
|
||||
Err(_errr) => None,
|
||||
};
|
||||
assert_eq!(new_claims, Some(claims));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user