File tree Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -17,25 +17,5 @@ describe('offline tests', () => {
1717 it ( 'should return a 404 for bogus urls' , ( done ) => {
1818 request ( app ) . get ( '/foo/bar' ) . expect ( 404 , done ) ;
1919 } ) ;
20-
21- it ( 'should fetch and return a token for GET /api/v1/credentials' , ( done ) => {
22- const fakeToken = {
23- token : 'faketoken' ,
24- serviceUrl : 'https://stream.watsonplatform.net/speech-to-text/api' ,
25- } ;
26-
27- nock ( 'https://stream.watsonplatform.net:443' , { encodedQueryParams : true } )
28- . get ( '/authorization/api/v1/token' )
29- . query ( { url : 'https://stream.watsonplatform.net/speech-to-text/api' } )
30- . reply ( 200 , fakeToken , {
31- connection : 'close' ,
32- 'transfer-encoding' : 'chunked' ,
33- 'content-type' : 'text/xml' ,
34- 'x-dp-watson-tran-id' : 'stream-dp01-34302424' ,
35- date : 'Tue, 29 Mar 2016 19:50:27 GMT' ,
36- } ) ;
37-
38- request ( app ) . get ( '/api/v1/credentials' ) . expect ( 200 , fakeToken , done ) ;
39- } ) ;
4020 } ) ;
4121} ) ;
You can’t perform that action at this time.
0 commit comments