From c6ee77755c559b1fd856d8c1c81076d3fe60f413 Mon Sep 17 00:00:00 2001 From: Matthew Scheirer Date: Sun, 17 Sep 2017 22:55:03 -0400 Subject: [PATCH] client tests --- src/lib.rs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 6c90546..616d7ac 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -466,3 +466,30 @@ pub struct Address { #[serde(default)] pub postal_code: Option, #[serde(default)] pub country: Option, } + +#[test] +fn google() { + let id = "test".to_string(); + let secret = "a secret to everybody".to_string(); + let redirect = Url::parse("https://example.com/re").unwrap(); + let client = Client::discover(id, secret, redirect, issuer::google()).unwrap(); + client.auth_url(&Default::default()).unwrap(); +} + +#[test] +fn paypal() { + let id = "test".to_string(); + let secret = "a secret to everybody".to_string(); + let redirect = Url::parse("https://example.com/re").unwrap(); + let client = Client::discover(id, secret, redirect, issuer::paypal()).unwrap(); + client.auth_url(&Default::default()).unwrap(); +} + +#[test] +fn salesforce() { + let id = "test".to_string(); + let secret = "a secret to everybody".to_string(); + let redirect = Url::parse("https://example.com/re").unwrap(); + let client = Client::discover(id, secret, redirect, issuer::salesforce()).unwrap(); + client.auth_url(&Default::default()).unwrap(); +} \ No newline at end of file