@@ -434,20 +434,20 @@ describe('DataverseClient', () => {
434434 await client . getFile ( fileId )
435435
436436 assert . calledOnce ( axiosGetStub )
437- assert . calledWithExactly ( axiosGetStub , `${ host } /api/access/datafile/${ fileId } ?format=original ` , {
437+ assert . calledWithExactly ( axiosGetStub , `${ host } /api/access/datafile/${ fileId } ` , {
438438 headers : { 'X-Dataverse-key' : apiToken } ,
439439 responseType : 'arraybuffer'
440440 } )
441441 } )
442442
443- describe ( 'get ingested file' , ( ) => {
443+ describe ( 'get original file' , ( ) => {
444444 it ( 'should call axios with expected url' , async ( ) => {
445445 const fileId : string = random . number ( ) . toString ( )
446446
447- await client . getFile ( fileId , false )
447+ await client . getFile ( fileId , true )
448448
449449 assert . calledOnce ( axiosGetStub )
450- assert . calledWithExactly ( axiosGetStub , `${ host } /api/access/datafile/${ fileId } ` , {
450+ assert . calledWithExactly ( axiosGetStub , `${ host } /api/access/datafile/${ fileId } ?format=original ` , {
451451 headers : { 'X-Dataverse-key' : apiToken } ,
452452 responseType : 'arraybuffer'
453453 } )
@@ -461,7 +461,7 @@ describe('DataverseClient', () => {
461461 await client . getFile ( fileId )
462462
463463 assert . calledOnce ( axiosGetStub )
464- assert . calledWithExactly ( axiosGetStub , `${ host } /api/access/datafile/${ fileId } ?format=original ` , {
464+ assert . calledWithExactly ( axiosGetStub , `${ host } /api/access/datafile/${ fileId } ` , {
465465 headers : { 'X-Dataverse-key' : '' } ,
466466 responseType : 'arraybuffer'
467467 } )
@@ -475,7 +475,7 @@ describe('DataverseClient', () => {
475475 'test' : randomValue
476476 }
477477 axiosGetStub
478- . withArgs ( `${ host } /api/access/datafile/${ fileId } ?format=original ` , {
478+ . withArgs ( `${ host } /api/access/datafile/${ fileId } ` , {
479479 headers : { 'X-Dataverse-key' : apiToken } ,
480480 responseType : 'arraybuffer'
481481 } )
0 commit comments