From 07044c9da023ce58e46ea596711110a324d98166 Mon Sep 17 00:00:00 2001 From: Derek Lawless Date: Mon, 25 Jan 2016 22:06:12 -0600 Subject: [PATCH] Initial test creation --- gapi.auth2/gapi.auth2-tests.ts | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 gapi.auth2/gapi.auth2-tests.ts diff --git a/gapi.auth2/gapi.auth2-tests.ts b/gapi.auth2/gapi.auth2-tests.ts new file mode 100644 index 000000000..cbe6c0fd3 --- /dev/null +++ b/gapi.auth2/gapi.auth2-tests.ts @@ -0,0 +1,29 @@ +/// + +function test_init(){ + var auth = gapi.auth2.init(); +} + +function test_getAuthInstance(){ + gapi.auth2.init(); + var auth = gapi.auth2.getAuthInstance(); +} + +function test_render(){ + var success = (googleUser: gapi.auth2.GoogleUser): void => { + console.log(googleUser); + }; + var failure = (): void => { + console.log('Failure callback'); + }; + + gapi.signin2.render('testId', { + scope: 'some scope', + width: 250, + height: 50, + longtitle: true, + theme: 'dark', + onsuccess: success, + onfailure: failure + }); +}