File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,9 @@ describe('AuthorizeNet service', function () {
106
106
. then ( function ( trans ) {
107
107
assert . equal ( trans . transactionResponse . responseCode , '1' ) ;
108
108
done ( ) ;
109
+ } )
110
+ . catch ( function ( err ) {
111
+ console . log ( err ) ;
109
112
} ) ;
110
113
} ) ;
111
114
@@ -262,7 +265,8 @@ describe('AuthorizeNet service', function () {
262
265
it ( 'should get the batch statistics' , function ( done ) {
263
266
service . getSettledBatchList ( true , new Date ( Date . now ( ) - 7 * 24 * 3600 * 1000 ) , new Date ( ) ) . then ( function ( response ) {
264
267
assert ( response . batchList , 'batchList should be defined' ) ;
265
- return service . getBatchStatistics ( response . batchList . batch [ 0 ] . batchId ) ;
268
+ var batchId = response . batchList . batch . length ? response . batchList . batch [ 0 ] . batchId : response . batchList . batch . batchId ;
269
+ return service . getBatchStatistics ( batchId ) ;
266
270
} )
267
271
. then ( function ( response ) {
268
272
assert ( response . batch , 'batch should be defined' ) ;
You can’t perform that action at this time.
0 commit comments