mirror of
https://github.com/openai/codex.git
synced 2026-04-24 06:35:50 +00:00
Simplify id token parser test
Collapse the missing and empty id_token parser coverage into one focused missing-field regression test. Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -125,35 +125,6 @@ fn token_data_handles_missing_id_token() {
|
||||
}))
|
||||
.expect("token data should parse");
|
||||
|
||||
assert_eq!(
|
||||
tokens,
|
||||
TokenData {
|
||||
id_token: IdTokenInfo::default(),
|
||||
access_token: "access-token".to_string(),
|
||||
refresh_token: "refresh-token".to_string(),
|
||||
account_id: Some("account-id".to_string()),
|
||||
}
|
||||
);
|
||||
assert_eq!(
|
||||
serde_json::to_value(&tokens).expect("token data should serialize"),
|
||||
serde_json::json!({
|
||||
"access_token": "access-token",
|
||||
"refresh_token": "refresh-token",
|
||||
"account_id": "account-id",
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn token_data_handles_empty_id_token() {
|
||||
let tokens: TokenData = serde_json::from_value(serde_json::json!({
|
||||
"id_token": "",
|
||||
"access_token": "access-token",
|
||||
"refresh_token": "refresh-token",
|
||||
"account_id": "account-id",
|
||||
}))
|
||||
.expect("token data should parse");
|
||||
|
||||
assert_eq!(
|
||||
tokens,
|
||||
TokenData {
|
||||
|
||||
Reference in New Issue
Block a user