@@ -517,21 +517,21 @@ describe('google auth adapter', () => {
517517 const httpsRequest = require ( '../lib/Adapters/Auth/httpsRequest' ) ;
518518
519519 it ( 'should use id_token for validation is passed' , async ( ) => {
520- spyOn ( httpsRequest , 'request ' ) . and . callFake ( ( ) => {
520+ spyOn ( httpsRequest , 'get ' ) . and . callFake ( ( ) => {
521521 return Promise . resolve ( { sub : 'userId' } ) ;
522522 } ) ;
523523 await google . validateAuthData ( { id : 'userId' , id_token : 'the_token' } , { } ) ;
524524 } ) ;
525525
526526 it ( 'should use id_token for validation is passed and responds with user_id' , async ( ) => {
527- spyOn ( httpsRequest , 'request ' ) . and . callFake ( ( ) => {
527+ spyOn ( httpsRequest , 'get ' ) . and . callFake ( ( ) => {
528528 return Promise . resolve ( { user_id : 'userId' } ) ;
529529 } ) ;
530530 await google . validateAuthData ( { id : 'userId' , id_token : 'the_token' } , { } ) ;
531531 } ) ;
532532
533533 it ( 'should use access_token for validation is passed and responds with user_id' , async ( ) => {
534- spyOn ( httpsRequest , 'request ' ) . and . callFake ( ( ) => {
534+ spyOn ( httpsRequest , 'get ' ) . and . callFake ( ( ) => {
535535 return Promise . resolve ( { user_id : 'userId' } ) ;
536536 } ) ;
537537 await google . validateAuthData (
@@ -541,14 +541,14 @@ describe('google auth adapter', () => {
541541 } ) ;
542542
543543 it ( 'should use access_token for validation is passed with sub' , async ( ) => {
544- spyOn ( httpsRequest , 'request ' ) . and . callFake ( ( ) => {
544+ spyOn ( httpsRequest , 'get ' ) . and . callFake ( ( ) => {
545545 return Promise . resolve ( { sub : 'userId' } ) ;
546546 } ) ;
547547 await google . validateAuthData ( { id : 'userId' , id_token : 'the_token' } , { } ) ;
548548 } ) ;
549549
550550 it ( 'should fail when the id_token is invalid' , async ( ) => {
551- spyOn ( httpsRequest , 'request ' ) . and . callFake ( ( ) => {
551+ spyOn ( httpsRequest , 'get ' ) . and . callFake ( ( ) => {
552552 return Promise . resolve ( { sub : 'badId' } ) ;
553553 } ) ;
554554 try {
@@ -563,7 +563,7 @@ describe('google auth adapter', () => {
563563 } ) ;
564564
565565 it ( 'should fail when the access_token is invalid' , async ( ) => {
566- spyOn ( httpsRequest , 'request ' ) . and . callFake ( ( ) => {
566+ spyOn ( httpsRequest , 'get ' ) . and . callFake ( ( ) => {
567567 return Promise . resolve ( { sub : 'badId' } ) ;
568568 } ) ;
569569 try {
0 commit comments