cli: add tests for wallet dump
This commit is contained in:
parent
40a24bad64
commit
fd98a9194a
1 changed files with 13 additions and 0 deletions
|
@ -2,6 +2,7 @@ package main
|
|||
|
||||
import (
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"math/big"
|
||||
"os"
|
||||
"path"
|
||||
|
@ -253,3 +254,15 @@ func TestImportDeployed(t *testing.T) {
|
|||
require.Equal(t, big.NewInt(1), b)
|
||||
})
|
||||
}
|
||||
|
||||
func TestWalletDump(t *testing.T) {
|
||||
e := newExecutor(t, false)
|
||||
defer e.Close(t)
|
||||
|
||||
e.Run(t, "neo-go", "wallet", "dump", "--wallet", "testdata/testwallet.json")
|
||||
rawStr := strings.TrimSpace(e.Out.String())
|
||||
w := new(wallet.Wallet)
|
||||
require.NoError(t, json.Unmarshal([]byte(rawStr), w))
|
||||
require.Equal(t, 1, len(w.Accounts))
|
||||
require.Equal(t, "NNuJqXDnRqvwgzhSzhH4jnVFWB1DyZ34EM", w.Accounts[0].Address)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue