@@ -2657,7 +2657,7 @@ describe("callbacks -", function () {
26572657 var response = mocks . responses . multipleResponse ;
26582658 scope = nock ( mocks . webApiUrl , {
26592659 reqheaders : {
2660- Authorization : "Bearer: token001"
2660+ Authorization : "Bearer token001"
26612661 }
26622662 } )
26632663 . get ( "/tests" )
@@ -2674,7 +2674,7 @@ describe("callbacks -", function () {
26742674 callback ( token ) ;
26752675 } ;
26762676
2677- adalCallback ( "token001" ) ;
2677+ adalCallback ( { accessToken : "token001" } ) ;
26782678 } ;
26792679
26802680 var dynamicsWebApiAuth = new DynamicsWebApiCallbacks ( { onTokenRefresh : getToken , webApiUrl : mocks . webApiUrl } ) ;
@@ -2699,15 +2699,15 @@ describe("callbacks -", function () {
26992699 var response = mocks . responses . multipleResponse ;
27002700 scope = nock ( mocks . webApiUrl , {
27012701 reqheaders : {
2702- Authorization : "Bearer: token001"
2702+ Authorization : "Bearer token001"
27032703 }
27042704 } )
27052705 . get ( "/tests" )
27062706 . reply ( response . status , response . responseText , response . responseHeaders ) ;
27072707
27082708 scope2 = nock ( mocks . webApiUrl , {
27092709 reqheaders : {
2710- Authorization : "Bearer: token002"
2710+ Authorization : "Bearer token002"
27112711 }
27122712 } )
27132713 . get ( "/tests" )
@@ -2724,7 +2724,7 @@ describe("callbacks -", function () {
27242724 callback ( token ) ;
27252725 } ;
27262726
2727- adalCallback ( "token00" + ++ i ) ;
2727+ adalCallback ( { accessToken : "token00" + ++ i } ) ;
27282728 } ;
27292729
27302730 it ( "sends the request to the right end point and returns a response" , function ( done ) {
@@ -2756,7 +2756,7 @@ describe("callbacks -", function () {
27562756 var response = mocks . responses . multipleResponse ;
27572757 scope = nock ( mocks . webApiUrl , {
27582758 reqheaders : {
2759- Authorization : "Bearer: overriden"
2759+ Authorization : "Bearer overriden"
27602760 }
27612761 } )
27622762 . get ( "/tests" )
@@ -2767,7 +2767,7 @@ describe("callbacks -", function () {
27672767 nock . cleanAll ( ) ;
27682768 } ) ;
27692769
2770- var getToken = sinon . spy ( function any ( callback ) { callback ( "token001" ) } ) ;
2770+ var getToken = sinon . spy ( function any ( callback ) { callback ( { accessToken : "token001" } ) } ) ;
27712771
27722772 it ( "sends the request to the right end point and returns a response" , function ( done ) {
27732773 var dynamicsWebApiAuth = new DynamicsWebApiCallbacks ( { onTokenRefresh : getToken , webApiUrl : mocks . webApiUrl } ) ;
0 commit comments