From 5d0fdaf2e5dac7203a7ed8bc70399a66d276f86e Mon Sep 17 00:00:00 2001 From: Janez Podhostnik Date: Tue, 14 May 2024 17:47:41 +0200 Subject: [PATCH] fix tests --- fvm/fvm_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fvm/fvm_test.go b/fvm/fvm_test.go index 76862bfe44c..86778c9a688 100644 --- a/fvm/fvm_test.go +++ b/fvm/fvm_test.go @@ -3368,7 +3368,7 @@ func TestDependencyCheck(t *testing.T) { deployServiceContractDependencyCheck(fmt.Sprintf(` access(all) fun checkDependencies(_ dependenciesAddresses: [Address], _ dependenciesNames: [String], _ authorizers: [Address]) { - if authorizers[0] == %s { + if authorizers.length == 1 && authorizers[0] == %s { return } @@ -3399,7 +3399,7 @@ func TestDependencyCheck(t *testing.T) { pub event TestEvent(_ dependenciesNames: [String]) access(all) fun checkDependencies(_ dependenciesAddresses: [Address], _ dependenciesNames: [String], _ authorizers: [Address]) { - if authorizers[0] == %s { + if authorizers.length == 1 && authorizers[0] == %s { return } @@ -3433,7 +3433,7 @@ func TestDependencyCheck(t *testing.T) { dependencies := payload.(cadence.Event).Fields[0].(cadence.Array).Values - require.Equal(t, []cadence.Value{cadence.String("D"), cadence.String("C"), cadence.String("B"), cadence.String("A")}, dependencies) + require.ElementsMatch(t, []cadence.Value{cadence.String("D"), cadence.String("C"), cadence.String("B"), cadence.String("A")}, dependencies) }, ) }))