Skip to content

Commit

Permalink
[1701]: Unit tests on the params query.
Browse files Browse the repository at this point in the history
  • Loading branch information
SpicyLemon committed Nov 14, 2023
1 parent 8b41d01 commit d37878c
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion x/exchange/client/cli/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,34 @@ func (s *CmdTestSuite) TestCmdQueryGetAllMarkets() {
}
}

// TODO[1701]: func (s *CmdTestSuite) TestCmdQueryParams()
func (s *CmdTestSuite) TestCmdQueryParams() {
tests := []queryCmdTestCase{
{
name: "cmd error",
args: []string{"params", "--unexpectedflag"},
expInErr: []string{"unknown flag: --unexpectedflag"},
},
{
name: "as text",
args: []string{"params", "--output", "text"},
expOut: `params:
default_split: 500
denom_splits: []
`,
},
{
name: "as json",
args: []string{"params", "--output", "json"},
expOut: `{"params":{"default_split":500,"denom_splits":[]}}` + "\n",
},
}

for _, tc := range tests {
s.Run(tc.name, func() {
s.runQueryCmdTestCase(tc)
})
}
}

// TODO[1701]: func (s *CmdTestSuite) TestCmdQueryValidateCreateMarket()

Expand Down

0 comments on commit d37878c

Please sign in to comment.