Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into apply_change_protos
Browse files Browse the repository at this point in the history
* main:
  modify error case (Finschia#882)
zemyblue committed Feb 6, 2023

Verified

This commit was signed with the committer’s verified signature.
zemyblue zemyblue
2 parents 8e66f25 + 471a4d7 commit c506b53
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions x/bankplus/keeper/keeper_test.go
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ import (

"github.com/stretchr/testify/suite"

sdkerrors "github.com/line/lbm-sdk/types/errors"
ocproto "github.com/line/ostracon/proto/ostracon/types"

"github.com/line/lbm-sdk/simapp"
@@ -281,22 +282,23 @@ func (suite *IntegrationTestSuite) TestInputOutputCoins() {
}
tcs := map[string]struct {
deactMultiSend bool
err error
}{
"MultiSend Off": {
true,
sdkerrors.ErrNotSupported.Wrap("MultiSend was deactivated"),
},
"MultiSend On": {
false,
nil,
},
}

for name, tc := range tcs {
tc := tc
suite.T().Run(name, func(t *testing.T) {
if tc.deactMultiSend {
suite.Panics(func() {
_ = targetKeeper(tc.deactMultiSend).InputOutputCoins(ctx, input, output)
})
if tc.err != nil {
suite.EqualError(targetKeeper(tc.deactMultiSend).InputOutputCoins(ctx, input, output), tc.err.Error())
} else {
err := targetKeeper(tc.deactMultiSend).InputOutputCoins(ctx, input, output)
suite.Assert().NoError(err)

0 comments on commit c506b53

Please sign in to comment.