From 91f4513357c58e95f24b897d549bbb6357d4eda3 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Fri, 11 Jun 2021 15:12:04 +0300 Subject: [PATCH] cli: fix `+` marshalling in TestNEP11_OwnerOf_BalanceOf_Transfer Problem: ``` executor_test.go:151: Error Trace: executor_test.go:151 executor_test.go:147 nep11_test.go:232 Error: Expect "{"name":"HASHY 3HNCEX8D9J0p\u002BLxmr3uPhOhSW90="}" to match "{"name":"HASHY 3HNCEX8D9J0p+Lxmr3uPhOhSW90="}" Test: TestNEP11_OwnerOf_BalanceOf_Transfer ``` Solution: Same as preesnted in #2006. --- cli/nep11_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cli/nep11_test.go b/cli/nep11_test.go index b61350c03..a1d967cc9 100644 --- a/cli/nep11_test.go +++ b/cli/nep11_test.go @@ -8,6 +8,7 @@ import ( "math/big" "os" "path" + "strings" "testing" "github.com/nspcc-dev/neo-go/pkg/core/native/nativenames" @@ -229,7 +230,8 @@ func TestNEP11_OwnerOf_BalanceOf_Transfer(t *testing.T) { // properties: ok e.Run(t, cmdProperties...) - e.checkNextLine(t, fmt.Sprintf(`{"name":"HASHY %s"}`, string(tokenID))) + marshalledID := strings.Replace(string(tokenID), "+", "\\u002B", -1) + require.Equal(t, fmt.Sprintf(`{"name":"HASHY %s"}`, marshalledID), e.getNextLine(t)) // tokensOf: good, several tokens tokenID1 := mint(t)