mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 11:41:48 +00:00
rpc/client: implement GetNativeContracts
This commit is contained in:
parent
02ca3d3dfd
commit
4f1bea0bcb
2 changed files with 26 additions and 0 deletions
|
@ -322,3 +322,17 @@ func TestInvokeVerify(t *testing.T) {
|
|||
require.False(t, res.Stack[0].Value().(bool))
|
||||
})
|
||||
}
|
||||
|
||||
func TestClient_GetNativeContracts(t *testing.T) {
|
||||
chain, rpcSrv, httpSrv := initServerWithInMemoryChain(t)
|
||||
defer chain.Close()
|
||||
defer rpcSrv.Shutdown()
|
||||
|
||||
c, err := client.New(context.Background(), httpSrv.URL, client.Options{})
|
||||
require.NoError(t, err)
|
||||
require.NoError(t, c.Init())
|
||||
|
||||
cs, err := c.GetNativeContracts()
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, chain.GetNatives(), cs)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue