@@ -30,7 +30,7 @@ describe('DataverseClient', () => {
3030 let requestPostStub : SinonStub
3131
3232 let mapBasicDatasetInformationStub : SinonStub
33- let getErrorBodyStub : SinonStub
33+ let getErrorMessageStub : SinonStub
3434
3535 beforeEach ( ( ) => {
3636 apiToken = random . uuid ( )
@@ -65,7 +65,7 @@ describe('DataverseClient', () => {
6565 requestPostStub = sandbox . stub ( request , 'post' ) . resolves ( mockResponse )
6666
6767 mapBasicDatasetInformationStub = sandbox . stub ( DatasetUtil , 'mapBasicDatasetInformation' ) . returns ( mockDatasetInformation )
68- getErrorBodyStub = sandbox . stub ( ResponseUtil , 'getErrorBody ' ) . returns ( mockErrorMessage )
68+ getErrorMessageStub = sandbox . stub ( ResponseUtil , 'getErrorMessage ' ) . returns ( mockErrorMessage )
6969 } )
7070
7171 afterEach ( ( ) => {
@@ -981,14 +981,14 @@ describe('DataverseClient', () => {
981981 } )
982982 } )
983983
984- it ( 'should call getErrorBody ' , async ( ) => {
984+ it ( 'should call getErrorMessage ' , async ( ) => {
985985 let error : DataverseException = undefined
986986
987987 await client . uploadDatasetThumbnail ( datasetId , imageBuffer ) . catch ( e => error = e )
988988
989989 expect ( error ) . to . be . instanceOf ( Error )
990- assert . calledOnce ( getErrorBodyStub )
991- assert . calledWithExactly ( getErrorBodyStub , mockBody )
990+ assert . calledOnce ( getErrorMessageStub )
991+ assert . calledWithExactly ( getErrorMessageStub , mockBody )
992992 } )
993993
994994 it ( 'should throw expected error' , async ( ) => {
@@ -1282,14 +1282,14 @@ describe('DataverseClient', () => {
12821282 } )
12831283 } )
12841284
1285- it ( 'should call getErrorBody ' , async ( ) => {
1285+ it ( 'should call getErrorMessage ' , async ( ) => {
12861286 let error : DataverseException = undefined
12871287
12881288 await client . replaceFile ( mockFileId , mockFilename , fileBuffer ) . catch ( e => error = e )
12891289
12901290 expect ( error ) . to . be . instanceOf ( Error )
1291- assert . calledOnce ( getErrorBodyStub )
1292- assert . calledWithExactly ( getErrorBodyStub , mockBody )
1291+ assert . calledOnce ( getErrorMessageStub )
1292+ assert . calledWithExactly ( getErrorMessageStub , mockBody )
12931293 } )
12941294
12951295 it ( 'should throw expected error' , async ( ) => {
0 commit comments