Skip to content

Commit

Permalink
chore: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jaeseung-bae committed Feb 8, 2024
1 parent 253863c commit 7c019c6
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion x/bankplus/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,16 @@ type IntegrationTestSuite struct {
addrCdc coreaddress.Codec
}

func (s *IntegrationTestSuite) SetupSuite() {
config := sdk.GetConfig()
config.SetBech32PrefixForAccount("link", "linkpub")
config.SetBech32PrefixForValidator("linkvaloper", "linkvaloperpub")
config.SetBech32PrefixForConsensusNode("linkvalcons", "linkvalconspub")
config.SetPurpose(44)
config.SetCoinType(438)
config.Seal()
}

func (s *IntegrationTestSuite) SetupTest() {
key := storetypes.NewKVStoreKey(types.StoreKey)
testCtx := testutil.DefaultContextWithDB(s.T(), key, storetypes.NewTransientStoreKey("transient_test"))
Expand All @@ -83,7 +93,7 @@ func (s *IntegrationTestSuite) SetupTest() {
newAcc := sdk.AccAddress("valid")
s.baseAcc = authtypes.NewBaseAccountWithAddress(newAcc)
s.authKeeper.EXPECT().GetAccount(gomock.Any(), newAcc).Return(nil).AnyTimes()
s.authKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec("cosmos")).AnyTimes()
s.authKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec("link")).AnyTimes()
s.authKeeper.EXPECT().NewAccountWithAddress(gomock.Any(), newAcc).Return(s.baseAcc).AnyTimes()
s.authKeeper.EXPECT().GetModuleAddress("").Return(nil).AnyTimes()
s.authKeeper.EXPECT().GetModuleAccount(gomock.Any(), "").Return(nil).AnyTimes()
Expand Down

0 comments on commit 7c019c6

Please sign in to comment.