0g-chain/x/savings/keeper/params_test.go
Denali Marsh 451bc05f47
Savings module params (#1190)
* module files

* proto types

* types and generated proto types

* keeper

* client scaffold

* add savings module to app

* remove placeholder types file

* implement rest and add to module

* update proto types

* validation for supported denoms

* generate updates proto types

* update comments

* update comments

* remove unused imports from proto files

* regenerate proto files

* remove abci

* remove refs to other modules

* remove endblocker call

* genesis init test for module account

* update genesis test with params

* add get/set params test
2022-03-23 14:27:54 +01:00

20 lines
465 B
Go

package keeper_test
import (
"github.com/kava-labs/kava/x/savings/types"
)
func (suite *KeeperTestSuite) TestGetSetParams() {
params := suite.keeper.GetParams(suite.ctx)
suite.Require().Equal(
types.Params{SupportedDenoms: []string(nil)},
params,
)
newParams := types.NewParams([]string{"btc", "test"})
suite.keeper.SetParams(suite.ctx, newParams)
fetchedParams := suite.keeper.GetParams(suite.ctx)
suite.Require().Equal(newParams, fetchedParams)
}