[#74] Update test of netmap.UpdateState event parser

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2020-10-08 15:54:57 +03:00 committed by Alex Vanin
parent fec5c81823
commit b5aef1011b

View file

@ -30,7 +30,7 @@ func TestParseUpdatePeer(t *testing.T) {
t.Run("wrong first parameter type", func(t *testing.T) {
_, err := ParseUpdatePeer([]smartcontract.Parameter{
{
Type: smartcontract.ByteArrayType,
Type: smartcontract.ArrayType,
},
})
@ -40,8 +40,8 @@ func TestParseUpdatePeer(t *testing.T) {
t.Run("wrong second parameter type", func(t *testing.T) {
_, err := ParseUpdatePeer([]smartcontract.Parameter{
{
Type: smartcontract.ByteArrayType,
Value: crypto.MarshalPublicKey(publicKey),
Type: smartcontract.IntegerType,
Value: state,
},
{
Type: smartcontract.ArrayType,
@ -53,14 +53,14 @@ func TestParseUpdatePeer(t *testing.T) {
t.Run("correct behavior", func(t *testing.T) {
ev, err := ParseUpdatePeer([]smartcontract.Parameter{
{
Type: smartcontract.ByteArrayType,
Value: crypto.MarshalPublicKey(publicKey),
},
{
Type: smartcontract.IntegerType,
Value: state,
},
{
Type: smartcontract.ByteArrayType,
Value: crypto.MarshalPublicKey(publicKey),
},
})
require.NoError(t, err)