File tree 1 file changed +3
-1
lines changed
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -238,6 +238,7 @@ describe('Wallet class', () => {
238
238
wallet . info = jest . fn ( ) . mockResolvedValue ( info ) ;
239
239
blocksMock . create . mockResolvedValue ( { hash : 'createdSendHash' } as any ) ;
240
240
blocksMock . process . mockResolvedValue ( 'processedSendHash' ) ;
241
+ KeyService . getPublicKey = jest . fn ( ) . mockReturnValue ( 'publicKey' ) ;
241
242
242
243
const result = await wallet . send ( 'destinationAddress' , '1' ) ;
243
244
expect ( wallet . info ) . toHaveBeenCalledWith ( {
@@ -249,9 +250,10 @@ describe('Wallet class', () => {
249
250
previous : 'frontierHash' ,
250
251
representative : 'representative' ,
251
252
balance : '4000000000000000000000000000000' , // Adjusted for unit conversion in test setup
252
- link : 'destinationAddress ' ,
253
+ link : 'publicKey ' ,
253
254
key : privateKey ,
254
255
} ) ;
256
+ expect ( KeyService . getPublicKey ) . toHaveBeenCalledWith ( 'destinationAddress' ) ;
255
257
expect ( blocksMock . process ) . toHaveBeenCalledWith ( { hash : 'createdSendHash' } , 'send' ) ;
256
258
expect ( result ) . toBe ( 'processedSendHash' ) ;
257
259
} ) ;
You can’t perform that action at this time.
0 commit comments