Skip to content

Commit

Permalink
feat: added tests for MsgUpdateInterchainQueryRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
ratik committed Oct 21, 2022
1 parent 0ac47e9 commit 0cb9228
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions x/interchainqueries/types/tx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,30 @@ func TestMsgUpdateQueryRequestValidate(t *testing.T) {
},
sdkerrors.ErrInvalidRequest,
},
{
"empty key path",
func() sdktypes.Msg {
return &iqtypes.MsgUpdateInterchainQueryRequest{
QueryId: 1,
NewKeys: []*iqtypes.KVKey{{Key: []byte("key1"), Path: ""}},
NewUpdatePeriod: 0,
Sender: TestAddress,
}
},
iqtypes.ErrEmptyKeyPath,
},
{
"empty key id",
func() sdktypes.Msg {
return &iqtypes.MsgUpdateInterchainQueryRequest{
QueryId: 1,
NewKeys: []*iqtypes.KVKey{{Key: []byte(""), Path: "path"}},
NewUpdatePeriod: 0,
Sender: TestAddress,
}
},
iqtypes.ErrEmptyKeyID,
},
{
"too many keys",
func() sdktypes.Msg {
Expand Down

0 comments on commit 0cb9228

Please sign in to comment.