Skip to content

Commit

Permalink
fix: Municipal Inflation: cli tests for query with denom (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
pbukva authored Jul 17, 2023
1 parent 796eeca commit fa16e36
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions x/mint/client/testutil/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,30 @@ func (s *IntegrationTestSuite) TestGetCmdQueryMunicipalInflation() {
expectedOutput string
}{
{
"json output",
"full - json output",
[]string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=json", tmcli.OutputFlag)},
`{"inflations":{"denom0":{"target_address":"cosmos1d9pzg5542spe4anjgu2zmk7wxhgh04ysn2phpq","inflation":"1.230000000000000000"},"denom1":{"target_address":"cosmos12kdu2sy0zcmz84qymyj6zcfvwss3a703xgpczm","inflation":"0.034500000000000000"}}}`,
},
{
"text output",
"full - text output",
[]string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=text", tmcli.OutputFlag)},
`inflations:
denom0:
inflation: "1.230000000000000000"
target_address: cosmos1d9pzg5542spe4anjgu2zmk7wxhgh04ysn2phpq
denom1:
inflation: "0.034500000000000000"
target_address: cosmos12kdu2sy0zcmz84qymyj6zcfvwss3a703xgpczm`,
},
{
"selected denom - json output",
[]string{"denom1", fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=json", tmcli.OutputFlag)},
`{"inflations":{"denom1":{"target_address":"cosmos12kdu2sy0zcmz84qymyj6zcfvwss3a703xgpczm","inflation":"0.034500000000000000"}}}`,
},
{
"selected denom - text output",
[]string{"denom1", fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=text", tmcli.OutputFlag)},
`inflations:
denom1:
inflation: "0.034500000000000000"
target_address: cosmos12kdu2sy0zcmz84qymyj6zcfvwss3a703xgpczm`,
Expand Down

0 comments on commit fa16e36

Please sign in to comment.