Moar tests!
This commit is contained in:
parent
3e71047f42
commit
badd0b6a05
|
@ -110,6 +110,7 @@ pub fn jwks(client: &Client, url: Url) -> Result<JWKSet<Empty>, Error> {
|
|||
|
||||
#[test]
|
||||
fn config_google() {
|
||||
// Formatting this took time off my lifespan...
|
||||
let cfg = r#"{ "issuer": "https://accounts.google.com",
|
||||
"authorization_endpoint": "https://accounts.google.com/o/oauth2/v2/auth",
|
||||
"token_endpoint": "https://www.googleapis.com/oauth2/v4/token",
|
||||
|
@ -129,7 +130,7 @@ fn config_google() {
|
|||
"sub" ],
|
||||
"code_challenge_methods_supported": [ "plain", "S256" ]
|
||||
}"#;
|
||||
println!("{:?}", ::serde_json::from_str::<Config>(cfg).unwrap());
|
||||
::serde_json::from_str::<Config>(cfg).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -142,5 +143,5 @@ fn config_minimum() {
|
|||
"subject_types_supported": [ "public" ],
|
||||
"id_token_signing_alg_values_supported": [ "RS256" ]
|
||||
}"#;
|
||||
println!("{:?}", ::serde_json::from_str::<Config>(cfg).unwrap());
|
||||
::serde_json::from_str::<Config>(cfg).unwrap();
|
||||
}
|
||||
|
|
|
@ -11,11 +11,23 @@ pub fn paypal() -> Url {
|
|||
}
|
||||
|
||||
pub fn salesforce() -> Url {
|
||||
Url::parse("http://login.salesforce.com").unwrap()
|
||||
Url::parse("https://login.salesforce.com").unwrap()
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn google_disco() {
|
||||
let client = ::reqwest::Client::new().unwrap();
|
||||
let config = ::discovery::discover(&client, google()).unwrap();
|
||||
::discovery::discover(&client, google()).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn paypal_disco() {
|
||||
let client = ::reqwest::Client::new().unwrap();
|
||||
::discovery::discover(&client, paypal()).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn salesforce_disco() {
|
||||
let client = ::reqwest::Client::new().unwrap();
|
||||
::discovery::discover(&client, salesforce()).unwrap();
|
||||
}
|
Loading…
Reference in New Issue