@@ -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
@@ -161,8 +160,7 @@ describe('Client', () => {
161
160
162
161
addresses . should . have . length ( batch . length ) ;
163
162
164
- headers . should . have . property ( 'server' ) ;
165
- headers . server . should . startWith ( 'bitcoin-json-rpc' ) ;
163
+ headers . should . have . keys ( 'date' , 'connection' , 'content-length' , 'content-type' ) ;
166
164
} ) ;
167
165
} ) ;
168
166
} ) ;
@@ -375,7 +373,7 @@ describe('Client', () => {
375
373
it ( 'should return a transaction json-encoded by default' , ( ) => {
376
374
return client . listUnspent ( )
377
375
. then ( ( [ transaction ] ) => client . getTransactionByHash ( transaction . txid ) )
378
- . then ( ( transaction ) => transaction . should . have . keys ( 'blockhash' , 'blocktime' , 'confirmations' , 'locktime' , 'time' , 'txid' , 'version' , 'vin' , 'vout' ) ) ;
376
+ . then ( ( transaction ) => transaction . should . have . keys ( 'blockhash' , 'blocktime' , 'confirmations' , 'locktime' , 'size' , ' time', 'txid' , 'version' , 'vin' , 'vout' ) ) ;
379
377
} ) ;
380
378
} ) ;
381
379
@@ -393,15 +391,15 @@ describe('Client', () => {
393
391
it ( 'should return a block json-encoded by default' , ( ) => {
394
392
return client . getBlockByHash ( '0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206' , { extension : 'json' } )
395
393
. then ( ( block ) => {
396
- block . should . have . keys ( 'bits' , 'chainwork' , 'confirmations' , 'difficulty' , 'hash' , 'height' , 'merkleroot' , 'nextblockhash' , 'nonce' , 'size' , 'time' , 'tx' , 'version' ) ;
394
+ block . should . have . keys ( 'bits' , 'chainwork' , 'confirmations' , 'difficulty' , 'hash' , 'height' , 'mediantime' , ' merkleroot', 'nextblockhash' , 'nonce' , 'size' , 'time' , 'tx' , 'version' ) ;
397
395
block . tx . should . matchEach ( ( value ) => value . should . be . an . Object ( ) ) ;
398
396
} ) ;
399
397
} ) ;
400
398
401
399
it ( 'should return a block summary json-encoded if `summary` is enabled' , ( ) => {
402
400
return client . getBlockByHash ( '0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206' , { extension : 'json' , summary : true } )
403
401
. then ( ( block ) => {
404
- block . should . have . keys ( 'bits' , 'chainwork' , 'confirmations' , 'difficulty' , 'hash' , 'height' , 'merkleroot' , 'nextblockhash' , 'nonce' , 'size' , 'time' , 'tx' , 'version' ) ;
402
+ block . should . have . keys ( 'bits' , 'chainwork' , 'confirmations' , 'difficulty' , 'hash' , 'height' , 'mediantime' , ' merkleroot', 'nextblockhash' , 'nonce' , 'size' , 'time' , 'tx' , 'version' ) ;
405
403
block . tx . should . matchEach ( ( value ) => value . should . be . a . String ( ) ) ;
406
404
} ) ;
407
405
} ) ;
@@ -473,14 +471,14 @@ describe('Client', () => {
473
471
describe ( 'getMemoryPoolContent()' , ( ) => {
474
472
it ( 'should return memory pool content json-encoded by default' , ( ) => {
475
473
return new Client ( config . bitcoind ) . getMemoryPoolContent ( )
476
- . then ( ( content ) => content . should . equal ( 'Not Found' ) ) ;
474
+ . then ( ( content ) => content . should . eql ( { } ) ) ;
477
475
} ) ;
478
476
} ) ;
479
477
480
478
describe ( 'getMemoryPoolInformation()' , ( ) => {
481
479
it ( 'should return memory pool information json-encoded by default' , ( ) => {
482
480
return new Client ( config . bitcoind ) . getMemoryPoolContent ( )
483
- . then ( ( information ) => information . should . equal ( 'Not Found' ) ) ;
481
+ . then ( ( information ) => information . should . eql ( { } ) ) ;
484
482
} ) ;
485
483
} ) ;
486
484
} ) ;
0 commit comments