Skip to content

Commit 772b0d7

Browse files
authored
test(07-tendermint): remove unused expPass in TestSetAndGetParams (#8281)
1 parent 273df04 commit 772b0d7

File tree

1 file changed

+9
-16
lines changed

1 file changed

+9
-16
lines changed

modules/apps/27-interchain-accounts/controller/keeper/keeper_test.go

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -307,29 +307,22 @@ func (suite *KeeperTestSuite) TestSetInterchainAccountAddress() {
307307

308308
func (suite *KeeperTestSuite) TestSetAndGetParams() {
309309
testCases := []struct {
310-
name string
311-
input types.Params
312-
expPass bool // This is currently always true.
310+
name string
311+
input types.Params
313312
}{
314-
// it is not possible to set invalid booleans
315-
{"success: set params false", types.NewParams(false), true},
316-
{"success: set params true", types.NewParams(true), true},
313+
{"success: set params false", types.NewParams(false)},
314+
{"success: set params true", types.NewParams(true)},
317315
}
318316

319317
for _, tc := range testCases {
320318
suite.Run(tc.name, func() {
321319
suite.SetupTest() // reset
322320
ctx := suite.chainA.GetContext()
323-
if tc.expPass {
324-
suite.chainA.GetSimApp().ICAControllerKeeper.SetParams(ctx, tc.input)
325-
expected := tc.input
326-
p := suite.chainA.GetSimApp().ICAControllerKeeper.GetParams(ctx)
327-
suite.Require().Equal(expected, p)
328-
} else { // currently not possible to set invalid params
329-
suite.Require().Panics(func() {
330-
suite.chainA.GetSimApp().ICAControllerKeeper.SetParams(ctx, tc.input)
331-
})
332-
}
321+
322+
suite.chainA.GetSimApp().ICAControllerKeeper.SetParams(ctx, tc.input)
323+
expected := tc.input
324+
p := suite.chainA.GetSimApp().ICAControllerKeeper.GetParams(ctx)
325+
suite.Require().Equal(expected, p)
333326
})
334327
}
335328
}

0 commit comments

Comments
 (0)