From 471a4d7f2598e079c8a3126efd219cd6c092452f Mon Sep 17 00:00:00 2001 From: Jayden Lee <41176085+tkxkd0159@users.noreply.github.com> Date: Mon, 6 Feb 2023 17:28:51 +0900 Subject: [PATCH] modify error case (#882) --- x/bankplus/keeper/keeper_test.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/x/bankplus/keeper/keeper_test.go b/x/bankplus/keeper/keeper_test.go index 2d273ee69d..f46bf62ca8 100644 --- a/x/bankplus/keeper/keeper_test.go +++ b/x/bankplus/keeper/keeper_test.go @@ -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)