Skip to content

Commit

Permalink
fix TestGenesisAccountValidate" (#7763)
Browse files Browse the repository at this point in the history
Co-authored-by: Damian Nolan <damiannolan@gmail.com>
  • Loading branch information
meoaka3 and damiannolan authored Dec 20, 2024
1 parent bb670d2 commit ec65d27
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions modules/apps/27-interchain-accounts/types/account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,19 +120,19 @@ func (suite *TypesTestSuite) TestGenesisAccountValidate() {
ownerAddr := sdk.AccAddress(pubkey.Address())

testCases := []struct {
name string
acc authtypes.GenesisAccount
expPass bool
name string
acc authtypes.GenesisAccount
expErr error
}{
{
"success",
types.NewInterchainAccount(baseAcc, ownerAddr.String()),
true,
nil,
},
{
"interchain account with empty AccountOwner field",
types.NewInterchainAccount(baseAcc, ""),
false,
types.ErrInvalidAccountAddress,
},
}

Expand All @@ -141,10 +141,11 @@ func (suite *TypesTestSuite) TestGenesisAccountValidate() {

err := tc.acc.Validate()

if tc.expPass {
if tc.expErr == nil {
suite.Require().NoError(err)
} else {
suite.Require().Error(err)
suite.Require().ErrorIs(err, tc.expErr)
}
}
}
Expand Down

0 comments on commit ec65d27

Please sign in to comment.