()
| 518 | |
| 519 | #[test] |
| 520 | fn bundle_from_response_sets_fields() { |
| 521 | use oauth2::basic::BasicTokenResponse; |
| 522 | |
| 523 | let token_response: BasicTokenResponse = serde_json::from_str( |
| 524 | r#"{"access_token":"test-access","token_type":"bearer","expires_in":300,"refresh_token":"test-refresh"}"#, |
| 525 | ) |
| 526 | .unwrap(); |
| 527 | let bundle = bundle_from_oauth2_response(&token_response, "https://issuer", "my-client"); |
| 528 | assert_eq!(bundle.access_token, "test-access"); |
| 529 | assert_eq!(bundle.refresh_token.as_deref(), Some("test-refresh")); |
| 530 | assert_eq!(bundle.issuer, "https://issuer"); |
| 531 | assert_eq!(bundle.client_id, "my-client"); |
| 532 | assert!(bundle.expires_at.is_some()); |
| 533 | } |
| 534 | } |
nothing calls this directly
no test coverage detected