From b5aef1011bc55dbd5b584ff3d19aaf56183ee663 Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Thu, 8 Oct 2020 15:54:57 +0300 Subject: [PATCH] [#74] Update test of `netmap.UpdateState` event parser Signed-off-by: Alex Vanin --- pkg/morph/event/netmap/update_peer_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/morph/event/netmap/update_peer_test.go b/pkg/morph/event/netmap/update_peer_test.go index 3c81cbe3..72641f54 100644 --- a/pkg/morph/event/netmap/update_peer_test.go +++ b/pkg/morph/event/netmap/update_peer_test.go @@ -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)