From 6c885b5a1b2337c268aeda446a42ad028619a9e4 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Sat, 27 Feb 2016 19:22:47 -0500 Subject: [PATCH] Test google::Web auth_uri --- tests/auth_uri.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/auth_uri.rs b/tests/auth_uri.rs index c63f9a3..c31ff32 100644 --- a/tests/auth_uri.rs +++ b/tests/auth_uri.rs @@ -10,6 +10,20 @@ fn assert_get_uri_ok(uri: &str) { assert_eq!(hyper::Ok, response.status); } +#[test] +fn google_web_auth_uri_ok() { + let client = Client::::new( + String::from("143225766783-0h4h5ktpvhc7kqp6ohbpd2sssqrap57n.apps.googleusercontent.com"), + String::new(), + Some(String::from("https://cmcenroe.me/oauth2-paste/")), + ); + let auth_uri = client.auth_uri( + Some("https://www.googleapis.com/auth/userinfo.email"), + Some("state"), + ).unwrap(); + assert_get_uri_ok(&auth_uri); +} + #[test] fn google_installed_auth_uri_ok() { let client = Client::::new(