Skip to content

Commit

Permalink
add test for invalid amin address
Browse files Browse the repository at this point in the history
  • Loading branch information
jhernandezb committed Apr 30, 2022
1 parent b2c87eb commit e5060dc
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion x/wasm/keeper/proposal_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,19 @@ func TestInstantiateProposal_NoAdmin(t *testing.T) {
var (
oneAddress sdk.AccAddress = bytes.Repeat([]byte{0x1}, types.ContractAddrLen)
)
// test with no admin

// test invalid admin address
src := types.InstantiateContractProposalFixture(func(p *types.InstantiateContractProposal) {
p.CodeID = firstCodeID
p.RunAs = oneAddress.String()
p.Admin = "invalid"
p.Label = "testing"
})
_, err = govKeeper.SubmitProposal(ctx, src)
require.Error(t, err)

// test with no admin
src = types.InstantiateContractProposalFixture(func(p *types.InstantiateContractProposal) {
p.CodeID = firstCodeID
p.RunAs = oneAddress.String()
p.Admin = ""
Expand Down

0 comments on commit e5060dc

Please sign in to comment.