Skip to content

Commit

Permalink
Merge branch 'main' into apply_change_protos
Browse files Browse the repository at this point in the history
* main:
  modify error case (Finschia#882)
  • Loading branch information
zemyblue committed Feb 6, 2023
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
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit c506b53

Please sign in to comment.