From 7e5906f0b70809fe8d18fbdb0dc425eb296e4349 Mon Sep 17 00:00:00 2001 From: Grant Timmerman Date: Fri, 9 Mar 2018 17:08:42 -0800 Subject: [PATCH] Simplify OAuth tests. --- .../google-apps-script-oauth2-tests.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/types/google-apps-script-oauth2/google-apps-script-oauth2-tests.ts b/types/google-apps-script-oauth2/google-apps-script-oauth2-tests.ts index ca6d874fa4..4bad3291ff 100644 --- a/types/google-apps-script-oauth2/google-apps-script-oauth2-tests.ts +++ b/types/google-apps-script-oauth2/google-apps-script-oauth2-tests.ts @@ -14,8 +14,7 @@ function getDriveService() { .setScope('https://www.googleapis.com/auth/drive') .setParam('login_hint', Session.getActiveUser().getEmail()) .setParam('access_type', 'offline') - .setParam('approval_prompt', 'force') - ; + .setParam('approval_prompt', 'force'); } /** @@ -24,9 +23,5 @@ function getDriveService() { function authCallback(request: any) { const driveService = getDriveService(); const isAuthorized = driveService.handleCallback(request); - if (isAuthorized) { - Logger.log('success'); - } else { - Logger.log('denied'); - } + Logger.log(isAuthorized ? 'success' : 'denied'); }