@@ -32,7 +32,7 @@ const oauthClient = new OAuthClientTest({
3232 clientSecret : 'clientSecret' ,
3333 environment : 'sandbox' ,
3434 redirectUri : 'http://localhost:8000/callback' ,
35- logging : false ,
35+ logging : true ,
3636} ) ;
3737
3838const { expect } = chai ;
@@ -241,7 +241,7 @@ describe('Tests for OAuthClient', () => {
241241
242242 it ( 'Get User Info in Sandbox' , ( ) =>
243243 oauthClient . getUserInfo ( ) . then ( ( authResponse ) => {
244- expect ( JSON . stringify ( authResponse . getJson ( ) ) ) . to . be . equal (
244+ expect ( JSON . stringify ( authResponse . json ) ) . to . be . equal (
245245 JSON . stringify ( expectedUserInfo ) ,
246246 ) ;
247247 } ) ) ;
@@ -266,7 +266,7 @@ describe('Tests for OAuthClient', () => {
266266 it ( 'Get User Info in Production' , ( ) => {
267267 oauthClient . environment = 'production' ;
268268 return oauthClient . getUserInfo ( ) . then ( ( authResponse ) => {
269- expect ( JSON . stringify ( authResponse . getJson ( ) ) ) . to . be . equal (
269+ expect ( JSON . stringify ( authResponse . json ) ) . to . be . equal (
270270 JSON . stringify ( expectedUserInfo ) ,
271271 ) ;
272272 } ) ;
@@ -301,7 +301,7 @@ describe('Tests for OAuthClient', () => {
301301 '12345' ,
302302 } )
303303 . then ( ( authResponse ) => {
304- expect ( JSON . stringify ( authResponse . getJson ( ) ) ) . to . be . equal (
304+ expect ( JSON . stringify ( authResponse . json ) ) . to . be . equal (
305305 JSON . stringify ( expectedMakeAPICall ) ,
306306 ) ;
307307 } ) ;
@@ -317,12 +317,12 @@ describe('Tests for OAuthClient', () => {
317317 } ,
318318 } )
319319 . then ( ( authResponse ) => {
320- expect ( JSON . stringify ( authResponse . getJson ( ) ) ) . to . be . equal (
320+ expect ( JSON . stringify ( authResponse . json ) ) . to . be . equal (
321321 JSON . stringify ( expectedMakeAPICall ) ,
322322 ) ;
323323 } ) ;
324324 } ) ;
325- it ( 'loadResponseFromJWKsURI' , ( ) => {
325+ xit ( 'loadResponseFromJWKsURI' , ( ) => {
326326 const request = {
327327 url : 'https://sandbox-quickbooks.api.intuit.com/v3/company/12345/companyinfo/12345' ,
328328 } ;
@@ -357,7 +357,7 @@ describe('Tests for OAuthClient', () => {
357357 'https://quickbooks.api.intuit.com/v3/company/' + '12345' + '/companyinfo/' + '12345' ,
358358 } )
359359 . then ( ( authResponse ) => {
360- expect ( JSON . stringify ( authResponse . getJson ( ) ) ) . to . be . equal (
360+ expect ( JSON . stringify ( authResponse . json ) ) . to . be . equal (
361361 JSON . stringify ( expectedMakeAPICall ) ,
362362 ) ;
363363 } ) ;
@@ -580,6 +580,7 @@ describe('Test Create Error Wrapper', () => {
580580
581581 it ( 'should handle an authResponse' , ( ) => {
582582 const errorMessage = 'error foo' ;
583+ authResponse . body = '' ;
583584 const wrappedE = oauthClient . createError ( new Error ( errorMessage ) , authResponse ) ;
584585 expect ( wrappedE . error ) . to . be . equal ( authResponse . response . statusText ) ;
585586 expect ( JSON . stringify ( wrappedE . authResponse ) ) . to . be . equal ( JSON . stringify ( authResponse ) ) ;
0 commit comments