Skip to content

Commit

Permalink
don't use NewString
Browse files Browse the repository at this point in the history
  • Loading branch information
jribbink committed May 2, 2024
1 parent d42df85 commit a1765cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions flowkit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1372,9 +1372,7 @@ func TestScripts(t *testing.T) {
gw.ExecuteScript.Run(func(args mock.Arguments) {
assert.Len(t, string(args.Get(1).([]byte)), 86)
assert.Equal(t, "\"Foo\"", args.Get(2).([]cadence.Value)[0].String())
retVal, err := cadence.NewString("")
require.NoError(t, err)
gw.ExecuteScript.Return(retVal, nil)
gw.ExecuteScript.Return(cadence.String(""), nil)
})

args := []cadence.Value{cadence.String("Foo")}
Expand Down
3 changes: 1 addition & 2 deletions mocks/services_mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,7 @@ func DefaultMockServices() *MockServices {
})

t.ExecuteScript.Run(func(args mock.Arguments) {
retVal, err := cadence.NewString("")
t.ExecuteScript.Return(retVal, err)
t.ExecuteScript.Return(cadence.String(""), nil)
})

t.GetTransactionByID.Return(tests.NewTransaction(), nil)
Expand Down

0 comments on commit a1765cd

Please sign in to comment.