From e5060dc340c270a53dc466af7557229cf56d668d Mon Sep 17 00:00:00 2001 From: jhernandezb Date: Fri, 29 Apr 2022 19:16:04 -0600 Subject: [PATCH] add test for invalid amin address --- x/wasm/keeper/proposal_integration_test.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/x/wasm/keeper/proposal_integration_test.go b/x/wasm/keeper/proposal_integration_test.go index 9f1099e460..ea88f398d9 100644 --- a/x/wasm/keeper/proposal_integration_test.go +++ b/x/wasm/keeper/proposal_integration_test.go @@ -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 = ""