github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/libs/cosmos-sdk/x/staking/keeper/keeper_test.go (about) 1 package keeper 2 3 import ( 4 "testing" 5 6 "github.com/stretchr/testify/require" 7 8 "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/x/staking/types" 9 ) 10 11 func TestParams(t *testing.T) { 12 ctx, _, keeper, _ := CreateTestInput(t, false, 0) 13 expParams := types.DefaultParams() 14 15 //check that the empty keeper loads the default 16 resParams := keeper.GetParams(ctx) 17 require.True(t, expParams.Equal(resParams)) 18 19 //modify a params, save, and retrieve 20 expParams.MaxValidators = 777 21 keeper.SetParams(ctx, expParams) 22 resParams = keeper.GetParams(ctx) 23 require.True(t, expParams.Equal(resParams)) 24 }