@@ -122,8 +122,8 @@ describe('Client', () => {
122
122
return new Client ( _ . defaults ( { headers : true } , config . bitcoind ) ) . getInfo ( )
123
123
. then ( ( [ info , headers ] ) => {
124
124
info . should . be . an . Object ( ) ;
125
- headers . should . have . property ( 'server' ) ;
126
- headers . server . should . startWith ( 'bitcoin-json-rpc ') ;
125
+
126
+ headers . should . have . keys ( 'date' , 'connection' , 'content-length' , 'content-type ') ;
127
127
} ) ;
128
128
} ) ;
129
129
@@ -132,8 +132,8 @@ describe('Client', () => {
132
132
should . not . exist ( err ) ;
133
133
134
134
info . should . be . an . Object ( ) ;
135
- headers . should . have . property ( 'server' ) ;
136
- headers . server . should . startWith ( 'bitcoin-json-rpc ') ;
135
+
136
+ headers . should . have . keys ( 'date' , 'connection' , 'content-length' , 'content-type ') ;
137
137
} ) ;
138
138
} ) ;
139
139
@@ -146,8 +146,7 @@ describe('Client', () => {
146
146
. then ( ( [ addresses , headers ] ) => {
147
147
addresses . should . have . length ( batch . length ) ;
148
148
149
- headers . should . have . property ( 'server' ) ;
150
- headers . server . should . startWith ( 'bitcoin-json-rpc' ) ;
149
+ headers . should . have . keys ( 'date' , 'connection' , 'content-length' , 'content-type' ) ;
151
150
} ) ;
152
151
} ) ;
153
152
@@ -375,7 +374,7 @@ describe('Client', () => {
375
374
it ( 'should return a transaction json-encoded by default' , ( ) => {
376
375
return client . listUnspent ( )
377
376
. then ( ( [ transaction ] ) => client . getTransactionByHash ( transaction . txid ) )
378
- . then ( ( transaction ) => transaction . should . have . keys ( 'blockhash' , 'blocktime' , 'confirmations' , 'locktime' , 'time' , 'txid' , 'version' , 'vin' , 'vout' ) ) ;
377
+ . then ( ( transaction ) => transaction . should . have . keys ( 'blockhash' , 'blocktime' , 'confirmations' , 'locktime' , 'size' , ' time', 'txid' , 'version' , 'vin' , 'vout' ) ) ;
379
378
} ) ;
380
379
} ) ;
381
380
@@ -393,15 +392,15 @@ describe('Client', () => {
393
392
it ( 'should return a block json-encoded by default' , ( ) => {
394
393
return client . getBlockByHash ( '0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206' , { extension : 'json' } )
395
394
. then ( ( block ) => {
396
- block . should . have . keys ( 'bits' , 'chainwork' , 'confirmations' , 'difficulty' , 'hash' , 'height' , 'merkleroot' , 'nextblockhash' , 'nonce' , 'size' , 'time' , 'tx' , 'version' ) ;
395
+ block . should . have . keys ( 'bits' , 'chainwork' , 'confirmations' , 'difficulty' , 'hash' , 'height' , 'mediantime' , ' merkleroot', 'nextblockhash' , 'nonce' , 'size' , 'time' , 'tx' , 'version' ) ;
397
396
block . tx . should . matchEach ( ( value ) => value . should . be . an . Object ( ) ) ;
398
397
} ) ;
399
398
} ) ;
400
399
401
400
it ( 'should return a block summary json-encoded if `summary` is enabled' , ( ) => {
402
401
return client . getBlockByHash ( '0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206' , { extension : 'json' , summary : true } )
403
402
. then ( ( block ) => {
404
- block . should . have . keys ( 'bits' , 'chainwork' , 'confirmations' , 'difficulty' , 'hash' , 'height' , 'merkleroot' , 'nextblockhash' , 'nonce' , 'size' , 'time' , 'tx' , 'version' ) ;
403
+ block . should . have . keys ( 'bits' , 'chainwork' , 'confirmations' , 'difficulty' , 'hash' , 'height' , 'mediantime' , ' merkleroot', 'nextblockhash' , 'nonce' , 'size' , 'time' , 'tx' , 'version' ) ;
405
404
block . tx . should . matchEach ( ( value ) => value . should . be . a . String ( ) ) ;
406
405
} ) ;
407
406
} ) ;
@@ -473,14 +472,14 @@ describe('Client', () => {
473
472
describe ( 'getMemoryPoolContent()' , ( ) => {
474
473
it ( 'should return memory pool content json-encoded by default' , ( ) => {
475
474
return new Client ( config . bitcoind ) . getMemoryPoolContent ( )
476
- . then ( ( content ) => content . should . equal ( 'Not Found' ) ) ;
475
+ . then ( ( content ) => content . should . eql ( { } ) ) ;
477
476
} ) ;
478
477
} ) ;
479
478
480
479
describe ( 'getMemoryPoolInformation()' , ( ) => {
481
480
it ( 'should return memory pool information json-encoded by default' , ( ) => {
482
481
return new Client ( config . bitcoind ) . getMemoryPoolContent ( )
483
- . then ( ( information ) => information . should . equal ( 'Not Found' ) ) ;
482
+ . then ( ( information ) => information . should . eql ( { } ) ) ;
484
483
} ) ;
485
484
} ) ;
486
485
} ) ;
0 commit comments